結果
| 問題 |
No.454 逆2乗和
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2023-08-07 02:19:07 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 315 bytes |
| コンパイル時間 | 13,267 ms |
| コンパイル使用メモリ | 379,536 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-07 05:30:09 |
| 合計ジャッジ時間 | 67,392 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 20 WA * 11 |
コンパイルメッセージ
warning: variable `ANS` should have a snake case name --> src/main.rs:8:13 | 8 | let mut ANS:f64=0.0; | ^^^ help: convert the identifier to snake case: `ans` | = note: `#[warn(non_snake_case)]` on by default
ソースコード
fn main() {
let x: f64 = {
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
line.trim().parse().unwrap()
};
let mut ANS:f64=0.0;
for i in 1..1000000000{
ANS+=1.0/((i as f64 +x)*(i as f64 +x));
}
println!("{}",ANS);
}
titia