結果

問題 No.842 初詣
ユーザー fV9TwBhUoa9S3eVfV9TwBhUoa9S3eV
提出日時 2019-10-29 13:47:54
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 169 ms / 2,000 ms
コード長 439 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 7,984 KB
最終ジャッジ日時 2023-10-12 23:20:44
合計ジャッジ時間 1,887 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,824 KB
testcase_01 AC 15 ms
7,796 KB
testcase_02 AC 15 ms
7,968 KB
testcase_03 AC 36 ms
7,780 KB
testcase_04 AC 27 ms
7,828 KB
testcase_05 AC 76 ms
7,924 KB
testcase_06 AC 16 ms
7,748 KB
testcase_07 AC 47 ms
7,892 KB
testcase_08 AC 17 ms
7,920 KB
testcase_09 AC 31 ms
7,824 KB
testcase_10 AC 169 ms
7,984 KB
testcase_11 AC 15 ms
7,860 KB
testcase_12 AC 48 ms
7,860 KB
testcase_13 AC 27 ms
7,832 KB
testcase_14 AC 20 ms
7,788 KB
testcase_15 AC 17 ms
7,776 KB
testcase_16 AC 21 ms
7,796 KB
testcase_17 AC 34 ms
7,776 KB
testcase_18 AC 74 ms
7,776 KB
testcase_19 AC 38 ms
7,776 KB
testcase_20 AC 71 ms
7,848 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(is_able)
0