結果

問題 No.842 初詣
ユーザー pete1288998pete1288998
提出日時 2020-06-21 18:34:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 486 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 8,260 KB
最終ジャッジ日時 2023-09-16 18:33:48
合計ジャッジ時間 1,951 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,260 KB
testcase_01 AC 16 ms
8,200 KB
testcase_02 AC 15 ms
7,768 KB
testcase_03 AC 34 ms
8,092 KB
testcase_04 AC 25 ms
8,092 KB
testcase_05 AC 77 ms
8,108 KB
testcase_06 AC 18 ms
7,904 KB
testcase_07 AC 51 ms
7,796 KB
testcase_08 AC 17 ms
7,916 KB
testcase_09 AC 32 ms
8,152 KB
testcase_10 AC 126 ms
8,144 KB
testcase_11 AC 16 ms
7,856 KB
testcase_12 AC 18 ms
8,116 KB
testcase_13 AC 25 ms
8,168 KB
testcase_14 AC 20 ms
7,968 KB
testcase_15 AC 16 ms
7,816 KB
testcase_16 AC 23 ms
7,796 KB
testcase_17 AC 18 ms
8,160 KB
testcase_18 AC 18 ms
8,116 KB
testcase_19 AC 32 ms
8,224 KB
testcase_20 AC 75 ms
7,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

c = list(map(int,input().split()))

C = c[:-1]

g = c[-1]

for a in range(C[0]+1):
    for b in range(C[1]+1):
        for c in range(C[2]+1):
            for d in range(C[3]+1):
                for e in range(C[4]+1):
                    for f in range(C[5]+1):
                        total = 500*a + 100*b + 50*c + 10*d + 5*e + 1*f
                        if total == g:
                            print('YES')
                            exit()

print('NO')                        
0