結果
問題 | No.1737 One to N |
ユーザー |
|
提出日時 | 2024-06-27 13:58:13 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 261 bytes |
コンパイル時間 | 14,532 ms |
コンパイル使用メモリ | 377,572 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 13:58:37 |
合計ジャッジ時間 | 16,062 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
fn main() {let mut s = String::new();std::io::stdin().read_line(&mut s).ok();let mut n: u64 = s.trim().parse().unwrap();let (mut a, mut i) = (0, 2);while i <= n {if n % i == 0 {n /= i;a += i;} else {i += 1;}}println!("{a}")}