結果
問題 |
No.964 2020
|
ユーザー |
|
提出日時 | 2020-01-15 23:20:40 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,020 ms |
コード長 | 467 bytes |
コンパイル時間 | 12,257 ms |
コンパイル使用メモリ | 401,904 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-12 23:06:36 |
合計ジャッジ時間 | 13,266 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 |
ソースコード
use std::io::Read; fn solve(n: usize) { println!( "{}" , ((10-n)..=9).rev() .map(|i| (0..n).map(|_| i.to_string()).collect::<Vec<String>>()) .flatten() .collect::<Vec<String>>() .join("") ); } fn main() { let mut n = String::new(); std::io::stdin().read_to_string(&mut n).ok(); let n: usize = n.trim().split('\n').next().unwrap().trim().parse::<usize>().unwrap(); solve(n); }