結果
| 問題 |
No.1593 Perfect Distance
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-10 02:47:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 53 ms / 2,000 ms |
| コード長 | 154 bytes |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 82,004 KB |
| 実行使用メモリ | 62,040 KB |
| 最終ジャッジ日時 | 2024-07-01 22:09:42 |
| 合計ジャッジ時間 | 1,852 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
n = int(input())
cnt = 0
for x in range(1, n+1):
y = n**2-x**2
if x**2+y == n**2 and 0 < y and (y**0.5).is_integer():
cnt += 1
print(cnt)