結果

問題 No.781 円周上の格子点の数え上げ
コンテスト
ユーザー tso_moriri
提出日時 2019-01-13 13:35:33
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 434 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 599 ms
コンパイル使用メモリ 20,824 KB
実行使用メモリ 15,584 KB
最終ジャッジ日時 2026-05-31 15:25:56
合計ジャッジ時間 7,524 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 7 TLE * 1 -- * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import math
X,Y = map(int,input().split())
counterlist = []
for i in range(X,Y+1):
    counter = 0
    for k in range(math.floor((i/2)**0.5),math.ceil(i**0.5)):
        if (i-k**2)**0.5-math.floor((i-k**2)**0.5)==0.0:
            if k-(i/2)**0.5 == 0.0 or k == 0:
                counter +=0.5
            else:
                counter += 1
        else:
            pass
    counterlist.append(counter)
print(int(max(counterlist))*8)
0