結果
| 問題 |
No.152 貯金箱の消失
|
| コンテスト | |
| ユーザー |
zombietan
|
| 提出日時 | 2016-05-25 23:28:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 303 bytes |
| コンパイル時間 | 211 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,648 KB |
| 最終ジャッジ日時 | 2024-10-07 14:29:54 |
| 合計ジャッジ時間 | 1,361 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 12 |
ソースコード
import math
import fractions
L = int(input())
l = math.sqrt(L//4) + 1
c = 0
for m in range(1, L):
if m > l:
break
for n in range(m - 1, 0, -1):
if (m - n)%2 != 0 and fractions.gcd(m, n) == 1:
if 4 * (2 * (m * n + m**2)) <= L:
c += 1
print(c%1000003)
zombietan