結果

問題 No.152 貯金箱の消失
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-04-17 10:40:37
言語 Python2
(2.7.18)
結果
AC  
実行時間 212 ms / 5,000 ms
コード長 202 bytes
コンパイル時間 602 ms
コンパイル使用メモリ 6,708 KB
実行使用メモリ 27,088 KB
最終ジャッジ日時 2023-09-17 21:28:24
合計ジャッジ時間 2,386 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
7,976 KB
testcase_01 AC 23 ms
8,000 KB
testcase_02 AC 22 ms
8,092 KB
testcase_03 AC 23 ms
8,136 KB
testcase_04 AC 26 ms
8,280 KB
testcase_05 AC 25 ms
8,228 KB
testcase_06 AC 27 ms
8,524 KB
testcase_07 AC 51 ms
10,508 KB
testcase_08 AC 209 ms
26,884 KB
testcase_09 AC 212 ms
27,088 KB
testcase_10 AC 168 ms
22,680 KB
testcase_11 AC 102 ms
15,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
from fractions import gcd
L = int(raw_input())
M = int((L/8)**.5)
print len(filter(lambda x: gcd(*x)==1, ((m, n) for n in xrange(1, M+1) for m in xrange(n+1, M+1, 2) if 8*m*(m+n)<=L)))
0