結果

問題 No.2386 Udon Coupon (Easy)
ユーザー hato336hato336
提出日時 2023-07-21 21:38:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 579 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 81,772 KB
実行使用メモリ 85,100 KB
最終ジャッジ日時 2023-10-21 21:33:29
合計ジャッジ時間 7,121 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
84,908 KB
testcase_01 AC 142 ms
84,916 KB
testcase_02 AC 140 ms
84,912 KB
testcase_03 WA -
testcase_04 AC 138 ms
84,908 KB
testcase_05 WA -
testcase_06 AC 139 ms
84,916 KB
testcase_07 AC 136 ms
84,912 KB
testcase_08 AC 138 ms
84,912 KB
testcase_09 AC 139 ms
84,916 KB
testcase_10 AC 139 ms
84,908 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 140 ms
84,912 KB
testcase_14 AC 138 ms
84,912 KB
testcase_15 AC 136 ms
84,908 KB
testcase_16 AC 138 ms
84,916 KB
testcase_17 AC 140 ms
84,908 KB
testcase_18 WA -
testcase_19 AC 140 ms
84,908 KB
testcase_20 WA -
testcase_21 AC 138 ms
84,912 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 139 ms
84,908 KB
testcase_25 WA -
testcase_26 AC 139 ms
84,916 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 138 ms
84,916 KB
testcase_30 WA -
testcase_31 AC 139 ms
84,908 KB
testcase_32 AC 139 ms
84,912 KB
testcase_33 AC 141 ms
84,912 KB
testcase_34 AC 139 ms
84,912 KB
testcase_35 AC 140 ms
84,908 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
権限があれば一括ダウンロードができます

ソースコード

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