結果
| 問題 |
No.454 逆2乗和
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2023-08-07 02:28:17 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 324 bytes |
| コンパイル時間 | 13,370 ms |
| コンパイル使用メモリ | 379,864 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-11-07 05:45:40 |
| 合計ジャッジ時間 | 76,535 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 30 WA * 1 |
コンパイルメッセージ
warning: variable `ANS` should have a snake case name --> src/main.rs:8:13 | 8 | let mut ANS:f64=0.0000000005; | ^^^ 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.0000000005;
for i in 1..1200000000{
ANS+=1.0/((i as f64 +x)*(i as f64 +x));
}
println!("{}",ANS);
}
titia