結果
問題 | No.1406 Test |
ユーザー |
![]() |
提出日時 | 2022-12-23 19:11:39 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 367 bytes |
コンパイル時間 | 13,873 ms |
コンパイル使用メモリ | 399,804 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-18 04:12:11 |
合計ジャッジ時間 | 14,965 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
fn main() {let mut xx = String::new();std::io::Read::read_to_string(&mut std::io::stdin(), &mut xx).ok();let xx: Vec<usize> = xx.split_whitespace().skip(1).flat_map(str::parse).collect();let n = xx.len() + 1;let sum = xx.iter().sum::<usize>();let answer = (0..=100).filter(|&i| (sum + i) % n == 0).count();println!("{answer}");}