結果
問題 | No.542 1円玉と5円玉 |
ユーザー | Mario |
提出日時 | 2018-05-12 10:51:07 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 237 bytes |
コンパイル時間 | 198 ms |
コンパイル使用メモリ | 10,520 KB |
実行使用メモリ | 12,468 KB |
最終ジャッジ日時 | 2023-09-10 18:19:53 |
合計ジャッジ時間 | 3,971 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
12,456 KB |
testcase_01 | AC | 15 ms
8,112 KB |
testcase_02 | AC | 16 ms
8,160 KB |
testcase_03 | AC | 16 ms
8,076 KB |
testcase_04 | AC | 22 ms
8,044 KB |
testcase_05 | TLE | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
ソースコード
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)