結果
問題 | No.1593 Perfect Distance |
ユーザー | Fullmoon85072 |
提出日時 | 2021-11-28 14:53:54 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 276 bytes |
コンパイル時間 | 372 ms |
コンパイル使用メモリ | 86,780 KB |
実行使用メモリ | 81,644 KB |
最終ジャッジ日時 | 2023-09-14 01:15:45 |
合計ジャッジ時間 | 5,496 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 69 ms
71,660 KB |
testcase_01 | AC | 71 ms
71,452 KB |
testcase_02 | AC | 72 ms
71,244 KB |
testcase_03 | AC | 69 ms
71,276 KB |
testcase_04 | AC | 70 ms
71,276 KB |
testcase_05 | AC | 69 ms
71,368 KB |
testcase_06 | AC | 80 ms
76,632 KB |
testcase_07 | AC | 83 ms
76,260 KB |
testcase_08 | AC | 135 ms
77,648 KB |
testcase_09 | TLE | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
ソースコード
import math N = int(input()) twoN = math.pow(N, 2) count = 0 for x in range(N): for y in range(N): dx = math.pow(x, 2) dy = math.pow(y, 2) if dx + dy == twoN: count += 1 elif dx + dy > twoN: continue print(count)