結果

問題 No.2138 Add Bacon
ユーザー helloprahellopra
提出日時 2022-12-02 21:17:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 159 bytes
コンパイル時間 325 ms
コンパイル使用メモリ 82,624 KB
実行使用メモリ 54,216 KB
最終ジャッジ日時 2024-04-18 04:54:21
合計ジャッジ時間 2,245 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
52,516 KB
testcase_01 AC 35 ms
53,632 KB
testcase_02 AC 31 ms
51,800 KB
testcase_03 AC 31 ms
52,064 KB
testcase_04 AC 32 ms
52,440 KB
testcase_05 AC 32 ms
52,128 KB
testcase_06 AC 31 ms
52,736 KB
testcase_07 AC 35 ms
53,284 KB
testcase_08 AC 34 ms
52,212 KB
testcase_09 AC 31 ms
52,248 KB
testcase_10 AC 31 ms
52,532 KB
testcase_11 AC 31 ms
52,180 KB
testcase_12 AC 31 ms
52,612 KB
testcase_13 AC 31 ms
52,504 KB
testcase_14 AC 30 ms
53,236 KB
testcase_15 AC 32 ms
52,804 KB
testcase_16 AC 32 ms
52,728 KB
testcase_17 AC 32 ms
54,216 KB
testcase_18 AC 35 ms
52,464 KB
testcase_19 AC 32 ms
51,812 KB
testcase_20 AC 34 ms
52,552 KB
testcase_21 AC 33 ms
52,136 KB
testcase_22 AC 32 ms
52,760 KB
testcase_23 AC 31 ms
52,156 KB
testcase_24 AC 31 ms
52,188 KB
testcase_25 AC 34 ms
52,692 KB
testcase_26 AC 32 ms
52,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B,C,D,E = map(int,input().split())
ans = A-B
tas = A+1-1
cal = B+1-1

for i in range(C):
    tas += D
    cal += E
    ans = max(ans,tas-cal)
    
print(ans)
0