結果
| 問題 |
No.1168 Digit Sum Sequence
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-22 23:01:58 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 283 bytes |
| コンパイル時間 | 14,804 ms |
| コンパイル使用メモリ | 384,232 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-15 12:25:34 |
| 合計ジャッジ時間 | 13,085 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 29 |
ソースコード
fn main() {
let mut n = String::new();
std::io::stdin().read_line(&mut n).ok();
let mut n: usize = n.trim().parse().unwrap();
for _ in 2..=100 {
n = n.to_string().chars().map(|c| c.to_string().parse::<usize>().unwrap()).sum();
}
println!("{}", n);
}