結果
問題 |
No.1015 おつりは要らないです
|
ユーザー |
![]() |
提出日時 | 2021-02-02 14:54:15 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 397 bytes |
コンパイル時間 | 640 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 88,192 KB |
最終ジャッジ日時 | 2024-06-29 23:40:41 |
合計ジャッジ時間 | 4,562 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 WA * 12 |
ソースコード
N,X,Y,Z = map(int,input().split()) A = list(map(int,input().split())) for i in range(N): if A[i]>=10000 and Z > 0: temp = min(A[i]//10000,Z) A[i]-=temp*10000 Z-=temp if A[i]>=5000 and Y > 0: temp = min(A[i]//5000,Y) A[i]-=temp*5000 Y-=temp A.sort() for i in range(N-Z-Y): X-=A[i]//1000+1 if X>=0: print('Yes') else: print('No')