結果
| 問題 |
No.542 1円玉と5円玉
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-12-12 16:57:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 332 bytes |
| コンパイル時間 | 249 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 80,768 KB |
| 最終ジャッジ日時 | 2024-07-21 04:06:18 |
| 合計ジャッジ時間 | 4,094 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 TLE * 1 -- * 7 |
ソースコード
from itertools import product
A, B = map(int, input().split())
lists = ([1] * A) + ([5] * B)
ans = set()
for bools in product([True, False], repeat = len(lists)):
tmp = 0
for i, bool in enumerate(bools):
if bool: tmp += lists[i]
if tmp != 0: ans.add(str(tmp))
print("\n".join(sorted(list(ans), key = int)))