結果
問題 | No.756 チャンパーノウン定数 (1) |
ユーザー |
|
提出日時 | 2020-01-12 21:58:38 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 362 bytes |
コンパイル時間 | 14,766 ms |
コンパイル使用メモリ | 379,292 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 16:02:46 |
合計ジャッジ時間 | 15,717 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
use std::io::Read; fn solve(d: usize) { println!("{}", (1..60).map(|i| i.to_string()).collect::<Vec<String>>().join("").chars().skip(d-1).next().unwrap()); } fn main() { let mut d = String::new(); std::io::stdin().read_to_string(&mut d).ok(); let d: usize = d.trim().split('\n').next().unwrap().trim().parse::<usize>().unwrap(); solve(d); }