結果
| 問題 | No.1593 Perfect Distance |
| コンテスト | |
| ユーザー |
Fullmoon85072
|
| 提出日時 | 2021-11-28 14:53:54 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 276 bytes |
| 記録 | |
| コンパイル時間 | 2,035 ms |
| コンパイル使用メモリ | 95,728 KB |
| 実行使用メモリ | 83,968 KB |
| 最終ジャッジ日時 | 2026-08-03 04:48:44 |
| 合計ジャッジ時間 | 6,948 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 9 TLE * 1 -- * 7 |
ソースコード
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)
Fullmoon85072