結果
| 問題 |
No.781 円周上の格子点の数え上げ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-12 11:19:25 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 385 bytes |
| コンパイル時間 | 369 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 24,520 KB |
| 最終ジャッジ日時 | 2024-11-17 06:17:10 |
| 合計ジャッジ時間 | 37,369 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 1 TLE * 12 |
ソースコード
def f(x, y):
c = 0
for i in range(1, int(y**0.5)+1):
for j in range(int(y**0.5)+1):
d = i**2+j**2
if (d >= x) and (d <= y):
c += 1
c = max(0, c)
return (c * 4)
x, y = map(int, input().split())
if x ==y:
print(f(x, y))
else:
for i in range(x, y+1):
z = 0
z = max(z, f(i, i))
print(z)