結果

問題 No.542 1円玉と5円玉
ユーザー Mario
提出日時 2018-05-12 10:51:07
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 237 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 17,824 KB
最終ジャッジ日時 2024-06-28 09:32:11
合計ジャッジ時間 3,796 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 2 TLE * 1 -- * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations

a, b = map(int, input().split())
coins = [1] * a + [5] * b

total = set()

for n in range(1, a+b+1):
    for v in combinations(coins, n):
        total.add(sum(v))

for t in sorted(total):
    print(t)
0