結果

問題 No.781 円周上の格子点の数え上げ
ユーザー tso_moriritso_moriri
提出日時 2019-01-13 14:02:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 415 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 15,172 KB
最終ジャッジ日時 2023-08-26 20:42:12
合計ジャッジ時間 7,658 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
15,172 KB
testcase_01 WA -
testcase_02 AC 13 ms
7,924 KB
testcase_03 AC 14 ms
7,860 KB
testcase_04 AC 13 ms
8,008 KB
testcase_05 AC 13 ms
7,804 KB
testcase_06 AC 13 ms
7,876 KB
testcase_07 AC 14 ms
7,888 KB
testcase_08 AC 15 ms
7,808 KB
testcase_09 AC 15 ms
7,916 KB
testcase_10 AC 699 ms
8,528 KB
testcase_11 TLE -
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.ceil((i/2)**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