結果
問題 | No.152 貯金箱の消失 |
ユーザー |
|
提出日時 | 2015-04-16 22:36:14 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 168 ms / 5,000 ms |
コード長 | 267 bytes |
コンパイル時間 | 137 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 8,320 KB |
最終ジャッジ日時 | 2024-07-04 15:01:37 |
合計ジャッジ時間 | 1,802 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
#!/usr/bin/pythonfrom fractions import gcdL = int(raw_input())res = 0M = int((L/8)**.5)for n in xrange(1, M+1):for m in xrange(n+1, M+1, 2):if gcd(m, n) == 1:if 8 * m * (m + n) > L:breakres += 1print res