結果

問題 No.152 貯金箱の消失
ユーザー fmhrfmhr
提出日時 2015-02-16 00:16:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 412 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 10,792 KB
実行使用メモリ 15,400 KB
最終ジャッジ日時 2023-09-06 01:31:06
合計ジャッジ時間 12,505 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,940 KB
testcase_01 AC 16 ms
7,932 KB
testcase_02 AC 16 ms
7,852 KB
testcase_03 AC 16 ms
7,844 KB
testcase_04 AC 56 ms
8,248 KB
testcase_05 AC 62 ms
8,376 KB
testcase_06 AC 148 ms
8,632 KB
testcase_07 AC 4,998 ms
10,640 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
ans = []
p = []
for m in range(1, L//10, 1):
    a = 4*(m**2+m**2+2*m)
    if a > L:
        continue
    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