結果
| 問題 | No.51 やる気の問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-08 23:35:39 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 166µs | |
| コード長 | 449 bytes |
| 記録 | |
| コンパイル時間 | 903 ms |
| コンパイル使用メモリ | 190,996 KB |
| 実行使用メモリ | 9,912 KB |
| 最終ジャッジ日時 | 2026-09-25 04:00:37 |
| 合計ジャッジ時間 | 2,447 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
fn main() {
let mut w = input_line::<i64>()[0];
let d = input_line::<i64>()[0];
for i in 0..d - 1 {
w -= w / ((d - i) * (d - i));
}
if w < 0 {
w = 0;
}
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()
}