結果

問題 No.542 1円玉と5円玉
ユーザー 👑 rin204rin204
提出日時 2020-07-06 22:45:33
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 277 bytes
コンパイル時間 942 ms
コンパイル使用メモリ 11,800 KB
実行使用メモリ 10,408 KB
最終ジャッジ日時 2023-10-24 23:49:58
合計ジャッジ時間 1,650 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,080 KB
testcase_01 AC 29 ms
10,080 KB
testcase_02 AC 28 ms
10,080 KB
testcase_03 AC 28 ms
10,080 KB
testcase_04 AC 29 ms
10,080 KB
testcase_05 AC 28 ms
10,092 KB
testcase_06 AC 29 ms
10,108 KB
testcase_07 AC 28 ms
10,108 KB
testcase_08 AC 32 ms
10,128 KB
testcase_09 AC 29 ms
10,136 KB
testcase_10 AC 29 ms
10,084 KB
testcase_11 AC 28 ms
10,084 KB
testcase_12 AC 33 ms
10,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b = map(int, input().split())
lst = []

for i in range(a + 1):
    for j in range(b + 1):
        if i == j == 0:
            continue
        lst.append(i + j * 5)
lst.sort()
before = -1
for num in lst:
    if num == before:
        continue
    print(num)
    before = num
0