結果

問題 No.2386 Udon Coupon (Easy)
ユーザー hato336
提出日時 2023-07-21 21:38:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 579 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 86,144 KB
最終ジャッジ日時 2024-09-21 23:01:16
合計ジャッジ時間 7,476 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

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 = 0
if 10*a == 6*b and n >= 8:
    ans += a // 3 *n 
elif 10*a >= 6*b and 10*a >= 3*c:
    ans += (n // 3) * a
    n %= 3
elif 10*a <= 6*b and 6*b >= 3*c:
    ans += (n // 5) * b
    n %= 5
    ans += (n // 3) * a
else:
    ans += (n // 10) * c
    n %= 10
    if 10*a >= 6*b:
        ans += (n // 3) * a
    else:
        ans += (n // 5) * b
        ans %= 5
        ans += (n // 3) * a
print(ans)
0