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