結果

問題 No.842 初詣
ユーザー fV9TwBhUoa9S3eVfV9TwBhUoa9S3eV
提出日時 2019-10-29 13:46:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 552 bytes
コンパイル時間 658 ms
コンパイル使用メモリ 10,780 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2023-10-12 23:20:41
合計ジャッジ時間 1,871 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 15 ms
7,840 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 16 ms
7,820 KB
testcase_07 AC 46 ms
7,888 KB
testcase_08 AC 17 ms
7,796 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 15 ms
7,904 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 19 ms
7,824 KB
testcase_15 AC 16 ms
7,856 KB
testcase_16 AC 21 ms
7,828 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 67 ms
7,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# No.842 初詣
a, b, c, d, e, f, g = [int(s) for s in input().split()]
is_able = 'NO'

for a2 in range(a + 1):
    for b2 in range(b + 1):
        for c2 in range(c + 1):
            for d2 in range(d + 1):
                for e2 in range(e + 1):
                    for f2 in range(f + 1):
                        if 500 * a2 + 100 * b2 + 50 * c2 + 10 * d2 + 5 * e2 + f2 == g:
                            is_able = 'YES'
                            print(a2, b2, c2, d2, e2, f2, 500 * a2 + 100 * b2 + 50 * c2 + 10 * d2 + 5 * e2 + f2)

print(is_able)
0