結果

問題 No.2138 Add Bacon
ユーザー terasaterasa
提出日時 2022-12-01 00:14:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 467 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 56,064 KB
最終ジャッジ日時 2024-04-16 18:57:36
合計ジャッジ時間 2,291 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
55,552 KB
testcase_01 AC 46 ms
55,296 KB
testcase_02 AC 47 ms
55,680 KB
testcase_03 AC 47 ms
55,424 KB
testcase_04 AC 47 ms
56,064 KB
testcase_05 AC 47 ms
55,936 KB
testcase_06 AC 47 ms
56,064 KB
testcase_07 AC 51 ms
55,680 KB
testcase_08 AC 47 ms
55,296 KB
testcase_09 AC 46 ms
55,424 KB
testcase_10 AC 46 ms
55,680 KB
testcase_11 AC 46 ms
55,680 KB
testcase_12 AC 45 ms
55,552 KB
testcase_13 AC 47 ms
55,168 KB
testcase_14 AC 46 ms
55,424 KB
testcase_15 AC 46 ms
55,296 KB
testcase_16 AC 47 ms
55,680 KB
testcase_17 AC 46 ms
55,424 KB
testcase_18 AC 45 ms
55,424 KB
testcase_19 AC 47 ms
55,680 KB
testcase_20 AC 47 ms
55,808 KB
testcase_21 AC 48 ms
55,552 KB
testcase_22 AC 46 ms
55,680 KB
testcase_23 AC 46 ms
55,296 KB
testcase_24 AC 46 ms
55,168 KB
testcase_25 AC 47 ms
55,808 KB
testcase_26 AC 46 ms
55,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import itertools
import heapq
import bisect
import math
from collections import deque, defaultdict
from functools import lru_cache, cmp_to_key

input = sys.stdin.readline

if __file__ != 'prog.py':
    sys.setrecursionlimit(10 ** 6)


def readints(): return map(int, input().split())
def readlist(): return list(readints())
def readstr(): return input()[:-1]


A, B, C, D, E = readints()


def f(x):
    return (D - E) * x + A - B


print(max(f(0), f(C)))
0