結果
問題 |
No.137 貯金箱の焦り
|
ユーザー |
![]() |
提出日時 | 2021-05-14 08:45:00 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 287 bytes |
コンパイル時間 | 1,111 ms |
コンパイル使用メモリ | 82,300 KB |
実行使用メモリ | 84,992 KB |
最終ジャッジ日時 | 2024-10-01 12:56:49 |
合計ジャッジ時間 | 6,126 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 WA * 3 |
ソースコード
n,m = map(int,input().split()) *a, = map(int,input().split()) MOD = 1234567891 M = 24000 f = [0]*M f[0] = 1 while m: for ai in a: for i in range(ai,M)[::-1]: f[i] += f[i-ai] f[i] %= MOD f = f[m%2::2] f += [0]*(M-len(f)) m //= 2 print(f[0])