結果
| 問題 |
No.677 10^Nの約数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-28 10:36:07 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 397 bytes |
| コンパイル時間 | 13,920 ms |
| コンパイル使用メモリ | 391,700 KB |
| 実行使用メモリ | 13,640 KB |
| 最終ジャッジ日時 | 2024-12-20 20:43:25 |
| 合計ジャッジ時間 | 22,615 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 1 TLE * 2 |
ソースコード
use std::collections::HashSet;
fn main() {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
let n = 10u64.pow(s.trim().parse().unwrap());
let mut h = HashSet::new();
for a in 1..n {
if n / a < a {
break;
}
if n % a == 0 {
h.insert(a);
h.insert(n / a);
}
}
let mut a: Vec<_> = h.iter().collect();
a.sort();
a.iter().for_each(|&x| println!("{}", x));
}