結果
| 問題 |
No.1971 Easy Sudoku
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-20 10:42:39 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 418 bytes |
| コンパイル時間 | 24,584 ms |
| コンパイル使用メモリ | 389,168 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-22 03:24:32 |
| 合計ジャッジ時間 | 16,542 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 13 |
ソースコード
use std::collections::VecDeque;
fn main() {
let mut n = String::new();
std::io::stdin().read_line(&mut n).ok();
let n: usize = n.trim().parse().unwrap();
let mut base = (1..=n).collect::<VecDeque<usize>>();
for _ in 0..n {
println!("{}", base.iter().map(|&i| i.to_string()).collect::<Vec<_>>().join(" "));
let val = base.pop_front().unwrap();
base.push_back(val);
}
}