結果
| 問題 |
No.42 貯金箱の溜息
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-05-14 08:57:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 323 bytes |
| コンパイル時間 | 292 ms |
| コンパイル使用メモリ | 82,116 KB |
| 実行使用メモリ | 161,152 KB |
| 最終ジャッジ日時 | 2024-10-01 13:01:56 |
| 合計ジャッジ時間 | 17,240 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 TLE * 1 -- * 1 |
ソースコード
T,*M = map(int,open(0).read().split())
a = [1,5,10,50,100,500]
s = 666
MOD = 1000000009
for m in M:
f = [1]
while m:
f += [0]*s
for ai in a:
for i in range(ai,len(f))[::-1]:
f[i] += f[i-ai]
f[i] %= MOD
f = f[m%2::2]
m //= 2
print(f[0])
convexineq