結果
問題 | No.781 円周上の格子点の数え上げ |
ユーザー | lloyz |
提出日時 | 2022-06-01 22:40:29 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 599 bytes |
コンパイル時間 | 201 ms |
コンパイル使用メモリ | 81,804 KB |
実行使用メモリ | 723,852 KB |
最終ジャッジ日時 | 2023-10-21 00:59:19 |
合計ジャッジ時間 | 27,637 ms |
ジャッジサーバーID (参考情報) |
judge10 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | MLE | - |
testcase_01 | AC | 1,812 ms
256,772 KB |
testcase_02 | AC | 1,839 ms
256,776 KB |
testcase_03 | AC | 1,789 ms
256,772 KB |
testcase_04 | AC | 1,776 ms
256,776 KB |
testcase_05 | AC | 1,780 ms
256,776 KB |
testcase_06 | AC | 1,811 ms
256,772 KB |
testcase_07 | AC | 1,824 ms
256,772 KB |
testcase_08 | AC | 1,794 ms
256,776 KB |
testcase_09 | AC | 1,824 ms
256,772 KB |
testcase_10 | AC | 1,838 ms
256,776 KB |
testcase_11 | AC | 1,836 ms
256,772 KB |
testcase_12 | MLE | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
ソースコード
from collections import defaultdict Sq = [i**2 for i in range(3201)] PointCounter = defaultdict(int) for i in range(3201): for j in range(i, 3201): if Sq[i] + Sq[j] > 10**7: break if i == j: if i == 0: continue else: PointCounter[Sq[i] + Sq[j]] += 4 else: if i == 0: PointCounter[Sq[j]] += 4 else: PointCounter[Sq[i] + Sq[j]] += 8 x, y = map(int, input().split()) ans = 0 for i in range(x, y + 1): ans = max(ans, PointCounter[i]) print(ans)