結果
| 問題 |
No.51 やる気の問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-08 23:33:09 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 413 bytes |
| コンパイル時間 | 13,960 ms |
| コンパイル使用メモリ | 377,676 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 02:53:32 |
| 合計ジャッジ時間 | 14,161 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 RE * 6 |
ソースコード
fn main() {
let mut w = input_line::<u32>()[0];
let d = input_line::<u32>()[0];
for i in 0..d - 1 {
w -= w / ((d - i) * (d - i));
}
println!("{}", w);
}
fn input_line<T: std::str::FromStr>() -> Vec<T> {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
s.trim()
.split_whitespace()
.map(|e| e.parse().ok().unwrap())
.collect()
}