結果
| 問題 |
No.677 10^Nの約数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-26 22:42:43 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 679 bytes |
| コンパイル時間 | 11,482 ms |
| コンパイル使用メモリ | 396,460 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 18:18:09 |
| 合計ジャッジ時間 | 12,840 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 |
ソースコード
use std::io::stdin;
fn get_line() -> String {
let mut line = String::new();
stdin().read_line(&mut line).ok();
line
}
fn main() {
let line = get_line();
let n: usize = line.trim().parse().unwrap();
let mut twos: Vec<i64> = vec![1; n + 1];
for i in 0..n {
twos[i + 1] = twos[i] * 2;
}
let mut fives: Vec<i64> = vec![1; n + 1];
for i in 0..n {
fives[i + 1] = fives[i] * 5;
}
let mut results: Vec<i64> = Vec::new();
for two in twos.iter() {
for five in fives.iter() {
results.push(two * five);
}
}
results.sort();
for i in results {
println!("{}", i)
}
}