結果
問題 | No.781 円周上の格子点の数え上げ |
ユーザー | ixTL255 |
提出日時 | 2019-02-06 01:35:56 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
WA
|
実行時間 | - |
コード長 | 239 bytes |
コンパイル時間 | 693 ms |
コンパイル使用メモリ | 10,624 KB |
実行使用メモリ | 90,936 KB |
最終ジャッジ日時 | 2023-08-31 00:01:52 |
合計ジャッジ時間 | 4,783 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 115 ms
90,548 KB |
testcase_01 | WA | - |
testcase_02 | AC | 114 ms
86,140 KB |
testcase_03 | AC | 115 ms
86,332 KB |
testcase_04 | WA | - |
testcase_05 | AC | 114 ms
86,360 KB |
testcase_06 | AC | 131 ms
86,252 KB |
testcase_07 | AC | 154 ms
86,308 KB |
testcase_08 | TLE | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
ソースコード
import math a,b = map(int,input().split()) cnt = [0] * 10000010 r = int(math.sqrt(b)) for i in range(1,r+1): for j in range(r): if i*i + j*j <= b: cnt[i*i + j*j]+=1 ans = 0 for i in range(a,b+1): ans = max(ans, cnt[i]) print (4*ans)