結果
問題 |
No.781 円周上の格子点の数え上げ
|
ユーザー |
|
提出日時 | 2022-01-19 20:17:05 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 362 ms / 2,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 241 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 139,520 KB |
最終ジャッジ日時 | 2024-11-23 14:00:04 |
合計ジャッジ時間 | 3,348 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
x, y = map(int, input().split()) i = 1 squ = [] while i * i <= y: squ.append(i * i) i += 1 cnt = [0] * (y + 1) l = len(squ) ans = 0 for s in [0] + squ: for q in squ: if x <= s + q <= y: cnt[s + q] += 1 ans = max(ans, cnt[s + q]) print(4 * ans)