結果

問題 No.842 初詣
ユーザー neko_the_shadowneko_the_shadow
提出日時 2019-07-07 22:21:18
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 337 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 76,332 KB
最終ジャッジ日時 2023-07-28 05:54:57
合計ジャッジ時間 3,398 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,480 KB
testcase_01 AC 70 ms
71,284 KB
testcase_02 AC 71 ms
71,336 KB
testcase_03 AC 77 ms
75,952 KB
testcase_04 AC 74 ms
76,032 KB
testcase_05 AC 83 ms
76,084 KB
testcase_06 AC 79 ms
76,164 KB
testcase_07 AC 80 ms
76,084 KB
testcase_08 AC 79 ms
76,032 KB
testcase_09 AC 79 ms
75,936 KB
testcase_10 AC 90 ms
76,332 KB
testcase_11 AC 74 ms
71,364 KB
testcase_12 AC 78 ms
75,900 KB
testcase_13 AC 78 ms
76,140 KB
testcase_14 AC 77 ms
75,940 KB
testcase_15 AC 78 ms
76,016 KB
testcase_16 AC 78 ms
76,164 KB
testcase_17 AC 80 ms
75,748 KB
testcase_18 AC 79 ms
76,040 KB
testcase_19 AC 78 ms
76,108 KB
testcase_20 AC 84 ms
76,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
A, B, C, D, E, F, G = map(int, input().split())
print('YES' if any(500 * a + 100 * b + 50 * c + 10 * d + 5 * e + 1 * f == G for a, b, c, d, e, f in itertools.product(range(A + 1), range(B + 1), range(C + 1), range(D + 1), range(E + 1), range(F + 1))) else 'NO')
0