結果

問題 No.1015 おつりは要らないです
ユーザー kozykozy
提出日時 2021-05-09 16:35:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 610 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 11,920 KB
実行使用メモリ 21,104 KB
最終ジャッジ日時 2023-10-19 02:20:12
合計ジャッジ時間 7,962 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,136 KB
testcase_01 AC 35 ms
10,136 KB
testcase_02 AC 33 ms
10,136 KB
testcase_03 AC 30 ms
10,136 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 33 ms
10,136 KB
testcase_07 AC 31 ms
10,136 KB
testcase_08 AC 30 ms
10,136 KB
testcase_09 AC 31 ms
10,136 KB
testcase_10 AC 201 ms
20,536 KB
testcase_11 AC 194 ms
20,712 KB
testcase_12 AC 179 ms
20,208 KB
testcase_13 AC 184 ms
20,560 KB
testcase_14 AC 192 ms
21,104 KB
testcase_15 AC 185 ms
20,248 KB
testcase_16 AC 185 ms
20,536 KB
testcase_17 AC 191 ms
20,824 KB
testcase_18 AC 183 ms
20,496 KB
testcase_19 AC 184 ms
20,528 KB
testcase_20 AC 188 ms
20,644 KB
testcase_21 AC 190 ms
20,552 KB
testcase_22 AC 183 ms
20,552 KB
testcase_23 AC 178 ms
20,068 KB
testcase_24 AC 193 ms
20,700 KB
testcase_25 AC 192 ms
20,556 KB
testcase_26 AC 179 ms
20,528 KB
testcase_27 AC 186 ms
20,456 KB
testcase_28 AC 183 ms
20,448 KB
testcase_29 AC 182 ms
20,728 KB
testcase_30 AC 31 ms
10,136 KB
testcase_31 AC 133 ms
11,936 KB
testcase_32 AC 134 ms
11,936 KB
testcase_33 AC 111 ms
20,860 KB
testcase_34 WA -
testcase_35 AC 30 ms
10,136 KB
testcase_36 AC 30 ms
10,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X,Y,Z=map(int,input().split())
A=list(map(int,input().split()))
for i in range(len(A)):
  a=A[i]
  if a%1000==0:
    a=(a//1000)+1
  else:
    a=(a//1000)+1
  A[i]=a
for i in range(N):
  a=A[i]
  if a>=10:
    z=a//10
    if z>Z:
      a=a-Z*10
      Z=0
      
    else:
      Z-=z
      a=a%10
  if a>=5:
    y=a//5
    if y>Y:
      a=a-Y*5
      Y=0
    else:
      Y-=y
      a=a%5
  if a>=1:
    x=a
    if a>X:
      if [Y,Z]==[0,0]:
        print("No")
        exit()
      elif Y==0:
        Z-=1
        continue
      else:
        Y-=1
        continue
    else:
      X-=x
      a=0
print("Yes")
0