結果

問題 No.842 初詣
ユーザー kuuso1
提出日時 2019-06-28 21:38:31
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 753 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-02 04:29:07
合計ジャッジ時間 1,703 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
##  input functions for me
def ria(sep = ''):
    if sep == '' :
        return list(map(int, input().split())) 
    else: return list(map(int, input().split(sep)))
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()
##

## main ##
A, B, C, D, E, F, G = map(int, rsa())
ret = "NO"
for a in range(0,A+1):
    for b in range(0,B+1):
        for c in range(0,C+1):
            for d in range(0,D+1):
                for e in range(0,E+1):
                    rest = G - (500 * a - 100 * b + 50 * c + 10 * d + 5 * e)
                    if rest <= F and rest >= 0 : ret = "YES"

print (ret)



0