結果
問題 | No.1593 Perfect Distance |
ユーザー |
![]() |
提出日時 | 2022-12-23 21:22:17 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 315 bytes |
コンパイル時間 | 13,185 ms |
コンパイル使用メモリ | 381,180 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-18 04:24:13 |
合計ジャッジ時間 | 11,345 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 WA * 5 |
ソースコード
fn main() {let mut n = String::new();std::io::stdin().read_line(&mut n).ok();let n: u32 = n.trim().parse().unwrap();let mut answer = 0;for x in 1..n {if f64::from(n * n - x * x).sqrt().fract() < f64::EPSILON {answer += 1;}}println!("{answer}");}