結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,164 KB
testcase_01 AC 30 ms
10,164 KB
testcase_02 AC 30 ms
10,164 KB
testcase_03 AC 30 ms
10,164 KB
testcase_04 AC 31 ms
10,164 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 30 ms
10,164 KB
testcase_08 AC 30 ms
10,164 KB
testcase_09 AC 30 ms
10,164 KB
testcase_10 AC 171 ms
20,568 KB
testcase_11 AC 180 ms
20,740 KB
testcase_12 AC 165 ms
20,236 KB
testcase_13 AC 171 ms
20,588 KB
testcase_14 AC 173 ms
21,136 KB
testcase_15 AC 167 ms
20,280 KB
testcase_16 AC 175 ms
20,572 KB
testcase_17 AC 175 ms
20,856 KB
testcase_18 AC 168 ms
20,528 KB
testcase_19 AC 169 ms
20,504 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 30 ms
10,164 KB
testcase_31 AC 121 ms
11,964 KB
testcase_32 AC 118 ms
11,964 KB
testcase_33 AC 110 ms
20,888 KB
testcase_34 AC 30 ms
10,164 KB
testcase_35 AC 30 ms
10,164 KB
testcase_36 RE -
権限があれば一括ダウンロードができます

ソースコード

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:
    k=a//10
    if k>=Z:
      a=a-(10*Z)
      A[i]=a
      Z=0
      break
    else:
      a=a-(10*k)
      A[i]=a
      Z=Z-k
for i in range(N):
  a=A[i]
  if a>=5:
    k=a//5
    if k>=Y:
      a=a-(5*Y)
      A[i]=a
      Y=0
      break
    else:
      a=a-(5*k)
      A[i]=a
      Y=Y-k
A.sort()
A.reverse()
for i in range(Y+Z):
  A[i]=0
if sum(A)>X:
  print("No")
else:
  print("Yes")
0