結果

問題 No.152 貯金箱の消失
ユーザー fmhrfmhr
提出日時 2015-02-16 00:44:37
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 394 bytes
コンパイル時間 344 ms
コンパイル使用メモリ 86,756 KB
実行使用メモリ 96,976 KB
最終ジャッジ日時 2023-09-06 01:33:52
合計ジャッジ時間 7,987 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,508 KB
testcase_01 AC 70 ms
71,228 KB
testcase_02 AC 71 ms
71,192 KB
testcase_03 AC 71 ms
71,344 KB
testcase_04 AC 81 ms
76,220 KB
testcase_05 AC 81 ms
76,400 KB
testcase_06 AC 87 ms
76,460 KB
testcase_07 AC 394 ms
78,352 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
L = int(input())
ans = []
p = []
maxm = int(math.sqrt(L//4))
for m in range(1, maxm, 1):
    for n in range(1, m, 1):
        if (m-n)%2 == 1:
            q = (m**2+n**2)+(2*m*n)+(m**2-n**2)
            if q * 4 < L:
                if m/n not in p:
                    p.append(m/n)
                    ans.append(q)
            else:
                break

print(len(ans)%1000003)
0