結果
| 問題 | No.1593 Perfect Distance |
| コンテスト | |
| ユーザー |
c-yan
|
| 提出日時 | 2021-07-10 05:01:08 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
AC
|
| 実行時間 | 193 ms / 2,000 ms |
| コード長 | 169 bytes |
| 記録 | |
| コンパイル時間 | 331 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-03-23 04:19:52 |
| 合計ジャッジ時間 | 3,290 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
from math import isqrt
N = int(input())
result = 0
for x in range(1, N):
y = isqrt(N * N - x * x)
if x * x + y * y == N * N:
result += 1
print(result)
c-yan