結果
問題 | No.842 初詣 |
ユーザー |
![]() |
提出日時 | 2019-06-28 21:54:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 67 ms / 2,000 ms |
コード長 | 326 bytes |
コンパイル時間 | 552 ms |
コンパイル使用メモリ | 81,860 KB |
実行使用メモリ | 91,648 KB |
最終ジャッジ日時 | 2024-07-02 04:40:50 |
合計ジャッジ時間 | 2,302 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
coins = [500, 100, 50, 10, 5, 1] A, B, C, D, E, F, G = map(int, input().split()) coinamount = [A, B, C, D, E, F] totallist = [0] for i in range(0, 6): N = len(totallist) for j in range(0, N): for k in range(1, coinamount[i]+1): totallist.append(totallist[j]+coins[i]*k) if G in totallist: print('YES') else: print('NO')