結果
問題 |
No.1157 Many Quotients easy
|
ユーザー |
![]() |
提出日時 | 2020-10-04 20:40:44 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 337 bytes |
コンパイル時間 | 21,273 ms |
コンパイル使用メモリ | 391,684 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 18:07:33 |
合計ジャッジ時間 | 15,251 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
fn main() { let n = read::<usize>(); let ans = (1..n + 1) .map(|x| n / x) .collect::<std::collections::HashSet<_>>() .len(); println!("{}", ans); } fn read<T: std::str::FromStr>() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() }