結果

問題 No.842 初詣
ユーザー neko_the_shadowneko_the_shadow
提出日時 2019-07-07 22:21:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 75,264 KB
最終ジャッジ日時 2024-04-15 15:25:16
合計ジャッジ時間 2,135 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
51,968 KB
testcase_01 AC 41 ms
51,584 KB
testcase_02 AC 41 ms
51,968 KB
testcase_03 AC 49 ms
60,980 KB
testcase_04 AC 49 ms
59,648 KB
testcase_05 AC 58 ms
66,816 KB
testcase_06 AC 49 ms
59,008 KB
testcase_07 AC 56 ms
61,824 KB
testcase_08 AC 48 ms
58,624 KB
testcase_09 AC 52 ms
60,928 KB
testcase_10 AC 72 ms
75,264 KB
testcase_11 AC 41 ms
52,096 KB
testcase_12 AC 48 ms
59,264 KB
testcase_13 AC 51 ms
60,032 KB
testcase_14 AC 49 ms
59,136 KB
testcase_15 AC 48 ms
58,880 KB
testcase_16 AC 49 ms
59,264 KB
testcase_17 AC 50 ms
58,880 KB
testcase_18 AC 48 ms
59,264 KB
testcase_19 AC 52 ms
60,032 KB
testcase_20 AC 60 ms
67,584 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