結果
| 問題 |
No.1593 Perfect Distance
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2021-07-22 14:16:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 192 bytes |
| コンパイル時間 | 331 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2024-07-17 14:44:19 |
| 合計ジャッジ時間 | 2,032 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 5 WA * 12 |
ソースコード
N = int(input())
ans = 0
n = int(pow(N,0.5))
L = set([i**2 for i in range(1,n+1)])
#print(L)
for i in range(1,n+1):
if N - i ** 2 in L:
ans += 1
#print(i,N-i**2)
print(ans)
ntuda