結果
問題 |
No.800 四平方定理
|
ユーザー |
|
提出日時 | 2019-11-01 09:17:12 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 1,865 ms / 2,000 ms |
コード長 | 210 bytes |
コンパイル時間 | 235 ms |
コンパイル使用メモリ | 6,784 KB |
実行使用メモリ | 68,856 KB |
最終ジャッジ日時 | 2024-09-14 22:18:23 |
合計ジャッジ時間 | 28,456 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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