結果
| 問題 |
No.800 四平方定理
|
| コンテスト | |
| ユーザー |
sho_00
|
| 提出日時 | 2020-04-09 20:30:10 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 251 bytes |
| コンパイル時間 | 100 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 87,984 KB |
| 最終ジャッジ日時 | 2024-09-13 20:19:50 |
| 合計ジャッジ時間 | 28,331 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 TLE * 1 |
| other | AC * 12 TLE * 9 -- * 9 |
ソースコード
N,D=map(int,input().split())
L=[0]*(D+2*N**2)
cnt=0
for i in range(1,N+1):
for j in range(1,N+1):
L[i**2+j**2-1]+=1
for z in range(1,N+1):
for w in range(1,N+1):
A=D+w**2-z**2
if A<=1:
pass
else:
cnt+=L[A-1]
print(cnt)
sho_00