結果
問題 | No.2386 Udon Coupon (Easy) |
ユーザー |
|
提出日時 | 2023-07-21 21:44:05 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 162 ms / 2,000 ms |
コード長 | 467 bytes |
コンパイル時間 | 254 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 89,600 KB |
最終ジャッジ日時 | 2024-09-21 23:11:33 |
合計ジャッジ時間 | 7,994 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 37 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random#sys.setrecursionlimit(10**9)n = int(input())a,b,c = map(int,input().split())ans =-1for i in range(2*10**5+1):if n < i*3:continuetemp = a * intemp = n - 3 * iif 2*b >= c:temp += (ntemp // 5) * belse:temp += (ntemp // 10) * cntemp %= 10temp += (ntemp // 5) * bans = max(ans,temp)print(ans)