結果

問題 No.842 初詣
ユーザー pofpof
提出日時 2020-01-21 23:11:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 451 bytes
コンパイル時間 726 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 8,236 KB
最終ジャッジ日時 2023-09-20 16:44:21
合計ジャッジ時間 1,927 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,020 KB
testcase_01 AC 15 ms
8,200 KB
testcase_02 AC 15 ms
7,820 KB
testcase_03 AC 35 ms
8,052 KB
testcase_04 AC 25 ms
8,128 KB
testcase_05 AC 75 ms
8,232 KB
testcase_06 AC 16 ms
7,724 KB
testcase_07 AC 47 ms
7,748 KB
testcase_08 AC 16 ms
7,844 KB
testcase_09 AC 30 ms
8,196 KB
testcase_10 AC 120 ms
8,100 KB
testcase_11 AC 15 ms
7,800 KB
testcase_12 AC 17 ms
8,092 KB
testcase_13 AC 24 ms
8,132 KB
testcase_14 AC 19 ms
7,964 KB
testcase_15 AC 15 ms
7,812 KB
testcase_16 AC 21 ms
7,888 KB
testcase_17 AC 16 ms
8,236 KB
testcase_18 AC 17 ms
8,208 KB
testcase_19 AC 32 ms
8,100 KB
testcase_20 AC 71 ms
7,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l = list(map(int,input().split()))
import sys
for x1 in range(l[0]+1):
    for x2 in range(l[1]+1):
        for x3 in range(l[2]+1):
            for x4 in range(l[3]+1):
                for x5 in range(l[4]+1):
                    for x6 in range(l[5]+1):
                        if 500*x1+100*x2+50*x3+10*x4+5*x5 +1*x6 == l[-1]:
                            print("YES")
                            sys.exit()
                            
print("NO")
0