728x90
반응형

단순 사칙연산 문제이다.

N, A, B, C, D = map(int, input().split())
A = (N//A + (1 if N%A else 0))*B
C = (N//C + (1 if N%C else 0))*D

print(min(A, C))
728x90
반응형

+ Recent posts