結果

問題 No.781 円周上の格子点の数え上げ
ユーザー tso_moriritso_moriri
提出日時 2019-01-13 13:35:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 434 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 8,836 KB
最終ジャッジ日時 2023-08-26 20:25:15
合計ジャッジ時間 5,968 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 17 ms
7,936 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 16 ms
7,948 KB
testcase_07 AC 16 ms
7,920 KB
testcase_08 AC 16 ms
7,908 KB
testcase_09 AC 16 ms
7,912 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 TLE -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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