結果
問題 |
No.800 四平方定理
|
ユーザー |
|
提出日時 | 2019-11-01 09:17:53 |
言語 | PyPy2 (7.3.15) |
結果 |
AC
|
実行時間 | 387 ms / 2,000 ms |
コード長 | 210 bytes |
コンパイル時間 | 1,396 ms |
コンパイル使用メモリ | 76,684 KB |
実行使用メモリ | 140,548 KB |
最終ジャッジ日時 | 2024-09-14 22:31:47 |
合計ジャッジ時間 | 8,289 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#yuki800 n,d=map(int,raw_input().split()) sq=[i*i for i in range(1,n+1)] cnt=[0]*8000001 for w in sq: for z in sq: a=w-z+d if a>=1: cnt[a]+=1 res=0 for x in sq: for y in sq: res+=cnt[x+y] print res