結果
| 問題 | No.3693 均等に分ける |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2026-09-22 05:35:39 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 3 ms / 2,000 ms |
| + 18µs | |
| コード長 | 884 bytes |
| 記録 | |
| コンパイル時間 | 609 ms |
| コンパイル使用メモリ | 195,052 KB |
| 実行使用メモリ | 9,856 KB |
| 最終ジャッジ日時 | 2026-09-22 05:35:46 |
| 合計ジャッジ時間 | 2,769 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#![allow(non_snake_case, unused_imports)]
use std::collections::{BinaryHeap, HashMap, HashSet};
use proconio::{input, marker::Usize1, marker::Chars};
use itertools::Itertools;
#[allow(unused_macros)]
macro_rules! d {
( $( $x:expr ),* $(,)? ) => {
eprintln!(
concat!( $( stringify!($x), "={:?} " ),* ),
$( $x ),*
);
};
}
#[allow(dead_code)]
fn yn(b: bool) -> &'static str {
if b { "Yes" } else { "No" }
}
fn divmod(a: i64, b: i64) -> (i64, i64) {
(a.div_euclid(b), a.rem_euclid(b))
}
fn main() {
input! {
N: usize,
K: usize,
}
let (d, m) = divmod(N as i64, K as i64);
let ans = (0..K)
.map(|i| {
if i < m as usize {
d + 1
} else {
d
}
})
.collect_vec();
println!("{}", ans.iter().join(" "));
}
norioc