結果
| 問題 | No.842 初詣 |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-02-19 15:39:37 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 114 ms / 2,000 ms |
| + 666µs | |
| コード長 | 233 bytes |
| 記録 | |
| コンパイル時間 | 266 ms |
| コンパイル使用メモリ | 95,980 KB |
| 実行使用メモリ | 84,096 KB |
| 最終ジャッジ日時 | 2026-08-28 12:18:20 |
| 合計ジャッジ時間 | 3,409 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
*a,g = map(int,input().split())
from itertools import product
money = [500,100,50,10,5,1]
for lst in product(*(range(ai+1) for ai in a)):
if sum(i*j for i,j in zip(lst,money)) == g:
print("YES")
exit()
print("NO")
convexineq