문제

16917번: 양념 반 후라이드 반

풀이

구현

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/fd88eebd-3116-482d-8d2b-1b1def40e74f/Untitled.png

A, B, C, X, Y = map(int, input().split())

print(min(A + B, 2 * C) * min(X, Y) \\
	+ min([A, B][0 if X > Y else 1], 2 * C) * abs(X - Y))

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/772b2dfd-0f0a-4a2b-a38d-a1808a1d726d/Untitled.png

A, B, C, X, Y = map(int, input().split())

print(min(A + B, 2 * C) * min(X, Y) \\
	+ min(A if X > Y else B, 2 * C) * abs(X - Y))