結果
| 問題 | 
                            No.2386 Udon Coupon (Easy)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             FromBooska
                         | 
                    
| 提出日時 | 2023-07-21 21:40:25 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 343 bytes | 
| コンパイル時間 | 189 ms | 
| コンパイル使用メモリ | 82,304 KB | 
| 実行使用メモリ | 62,592 KB | 
| 最終ジャッジ日時 | 2024-09-21 23:05:45 | 
| 合計ジャッジ時間 | 40,162 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 29 TLE * 8 | 
ソースコード
# 全探索で間に合うか
# c and b
N = int(input())
A, B, C = map(int, input().split())
ans = 0
for c in range(N//10+1):
    b_max = (N-c*10)//5
    for b in range(b_max+1):
        a = (N-c*10-b*5)//3
        calc = a*A+b*B+c*C
        ans = max(ans, calc)
        #print('a', a, 'b', b, 'c', c, 'calc', calc, 'ans', ans)
print(ans)
            
            
            
        
            
FromBooska