結果

問題 No.2138 Add Bacon
ユーザー kukutoni
提出日時 2023-07-01 13:01:55
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-07 23:35:34
合計ジャッジ時間 1,530 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

deli, calory, becon, deli_per_be, calo_per_be = list(map(int, input().split()))
utility = deli - calory
for n in range(1, becon+1):
	if deli + n*deli_per_be - n*calo_per_be - calory > utility:
		utility = deli + n*deli_per_be - n*calo_per_be - calory
print(utility)
0