Problem:


Score : 100 points

Problem Statement

There is a hotel with the following accommodation fee:

X yen (the currency of Japan) per night, for the first K nights

Y yen per night, for the (K+1)-th and subsequent nights

Tak is staying at this hotel for N consecutive nights.
Find his total accommodation fee.

Constraints

1 \leq N, K \leq 10000

1 \leq Y < X \leq 10000

N,\,K,\,X,\,Y are integers.

Input

The input is given from Standard Input in the following format:

N
K
X
Y

Output

Print Tak's total accommodation fee.

Sample Input 1

5
3
10000
9000

Sample Output 1

48000

The accommodation fee is as follows:

10000 yen for the 1-st night

10000 yen for the 2-nd night

10000 yen for the 3-rd night

9000 yen for the 4-th night

9000 yen for the 5-th night

Thus, the total is 48000 yen.

Sample Input 2

2
3
10000
9000

Sample Output 2

20000



Sample input:
5
3
10000
9000


Sample output:
48000

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if N<=K:
  print(X*K)
else:
  print(K * X + (N - K) * Y)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
price = 0
for i in range(K):
  price += X
if N <= K:
  print(price)
else:
  for i in range(N-K):
    price += Y
  print(price)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
price = 0
for i in range(K):
  price += X
for i in range(N-K):
  price += Y
print(price)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

ans = 0
for i in range(n):
  if i <= k:
    ans += x
  else:
    ans += y
    
print(ans)

Submission status: Wrong Answer

Solution code:
n,k,x,y=[int(input()) for i in range(4)]
if n<=k:
    print(n*k)
else:
    print(k*x+(n-k)*y)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
if K < N:
    ans = N*X + (N-K)*Y
else:
    ans = N*X
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if K < N:
    ans = K*X + (N-K)*Y
else:
    ans = K*X
print(ans)

Submission status: Wrong Answer

Solution code:
def ston():
  n = int(input())
  k = int(input())
  x = int(input())
  y = int(input())
  if n <= k:
    print(n*x)
  else:
    print(k*x + (n-k)*y)

Submission status: Wrong Answer

Solution code:
a =[]
pri = 0

for i in range(4):
  s = input()
  a.append(s)

k = int(a[1]) * int(a[2])
eld = int(a[0]) - int(a[1])
elp = eld * int(a[3])
pls = k + elp
print(pls)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

print(n*x + max(k-n, 0)*y)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
if k >= n:
  print(k * x + (n - k) * y)
else:
  print(k * x)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
if k > n:
  print(k * x + (n - k) * y)
else:
  print(k * x)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
print(k * x + (n - k) * y)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
x = a - b
y = b * c
z = x * d
if a > b:
  print(y + z)
else:
  print(y)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
x = a - b
y = b * c
z = x * d
print(y + z)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
if k<n:
    print(k*x+(n-k)*y)
else:
    print(k*x)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
print(k*x+(n-k)*y)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

print(x*k + y * (n-k))

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())

a = int(input())
b = int(input())

total = 0

for i in range(k):
    total += a

for j in range(k,n):
    total += b
    
print(total)

Submission status: Wrong Answer

Solution code:
w=input()
count1=0
if(len(w)==1):
	
	print("No")	
for i in range(0,len(w)):
	a=w.count(w[i])
	if(a%2==0):
		count1+=1
	elif(a%2 != 0):
		count1-=1
		
if(count1>0):
	print("Yes")
elif(count1<0):
	print("No")

Submission status: Wrong Answer

Solution code:
w=input()
list_w=list(w)
count1=0
for i in range(0,len(list_w)):
	a=list_w.count(list_w[i])
	if(a%2==0):
		count1+=1
	elif(a%2 != 0):
		count1-=1
		
if(count1>0):
	print("Yes")
elif(count1<0):
	print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
fees=0
if(k>n or n==k):
	for i in range(0,n):
		fees+=x
elif(k<n):
	diff=n-k
	for j in range(0,k):
		fees+=x
	for k in range(0,diff):
		fees+=y

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
fees=0
if(k>n):
	for i in range(0,n):
		fees+=x
elif(k<n):
	diff=n-k
	for j in range(0,k):
		fees+=x
	for k in range(0,diff):
		fees+=y
		
print(fees)

Submission status: Wrong Answer

Solution code:
w = list(input())
s = set(w)
for i in s:
  if w.count(i)%2 != 0:
    print("No")
    break
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
import collections
import sys
a=input()
b=[]

for i in a:
  b.append(i)
  
b.sort()
c=collections.Counter(b)
c=list(c.values())

for i in range(len(c)):
  if int(c[i])%2==0:
    q=0
  else:
    q=1
    print('No')
    sys.exit()
    
print('Yes')

Submission status: Wrong Answer

Solution code:
import collections
a=input()
b=[]

for i in a:
  b.append(i)
  
b.sort()
c=collections.Counter(b)
c=list(c.values())

for i in range(len(c)):
  if int(c[i])%2==0:
    q=0
  else:
    q=1
    
if q==0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N,K,X,Y=[int(input()) for i in range(4)]

if(K>=N):
  Z=K*X
  print(Z)
else:
  Z=K*X+(N-K)*Y
  print(Z)

Submission status: Wrong Answer

Solution code:
N,K,X,Y=[int(input()) for i in range(4)]

if(K>N):
  Z=K*X
  print(Z)
else:
  Z=K*X+(N-K)*Y
  print(Z)

Submission status: Wrong Answer

Solution code:
N,K,X,Y=[int(input()) for i in range(4)]
Z=K*X+(N-K)*Y

if(K>N):
  Z=K*X
  print(Z)
else:
  Z=K*X+(N-K)*Y
  print(Z)

Submission status: Wrong Answer

Solution code:
N,K,X,Y=[int(input()) for i in range(4)]

if(K>N):
  N=K
else:
  N=N
Z=K*X+(N-K)*Y
print(Z)

Submission status: Wrong Answer

Solution code:
N,K,X,Y=[int(input()) for i in range(4)]

if(K>N):
  N=K

Z=K*X+(N-K)*Y
print(Z)

Submission status: Wrong Answer

Solution code:
N,K,X,Y=[int(input()) for i in range(4)]

Z=K*X+(N-K)*Y
print(Z)

Submission status: Wrong Answer

Solution code:
N,K,x,y = [int(input()) for i in range(4)]

print((N-K)*y + K*x)

Submission status: Wrong Answer

Solution code:
#44
N=int(input())
K=int(input())
X=int(input())
Y=int(input())
if Y<X:
    a=X*K+Y*(N-K)
print(a)

Submission status: Wrong Answer

Solution code:
#44
N=int(input())
K=int(input())
X=int(input())
Y=int(input())
a=X*K+Y*(N-K)
print(a)

Submission status: Wrong Answer

Solution code:
N=int(input())
K=int(input())
X=int(input())
Y=int(input())
a=X*K+Y*(N-K)
a

Submission status: Wrong Answer

Solution code:
# 044_a
# A - 高橋君とホテルイージー

N = int(input()) #連泊数
K = int(input()) #料金変動泊数
X = int(input()) #通常価格
Y = int(input()) #変動価格

if ((1 <= N & N <= 10000) & (1 <= K & K <= 10000)) \
        & (1 <= X & X <= 10000) & (1 <= Y & Y <= 10000):
    if (X > Y):
        price = 0
        if (N < K):
            for i in range(1, N + 1):
                price += X
        if (N >= K):
            for i in range(1, K + 1):
                price += X
            for j in range(1, N - K + 1):
                price += Y
            print(price)

Submission status: Wrong Answer

Solution code:
# 044_a
# A - 高橋君とホテルイージー

N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if ((1 <= N & N <= 10000) & (1 <= K & K <= 10000)) \
        & (1 <= X & X <= 10000) & (1 <= Y & Y <= 10000):
    if (X > Y):
        price = 0
        if (N <= K):
            for i in range(1, N + 1):
                price += X
        if (N > K):
            for i in range(1, K + 1):
                price += X
            for j in range(1, N - K + 1):
                price += Y
            print(price)

Submission status: Wrong Answer

Solution code:
# 044_a
# A - 高橋君とホテルイージー

N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if ((1 <= N & N <= 10000) & (1 <= K & K <= 10000)) \
        & (1 <= X & X <= 10000) & (1 <= Y & Y <= 10000):
    if (X > Y):
        price = 0
        if (N <= K):
            for i in range(1, N + 1):
                price += X
        if (N > K):
            for i in range(1, K + 1):
                price += X
                for j in range(1, (N - (K + 1))):
                    price += Y
        print(price)

Submission status: Wrong Answer

Solution code:
# 数値の取得
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

# 宿泊費の計算後結果を出力
account = (K * X) + (max(N - K,0) * Y) 
print(account)

Submission status: Wrong Answer

Solution code:
# 数値の取得
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

# 宿泊費の計算後結果を出力
account = (K * X) + (abs(N - K) * Y) 
print(account)

Submission status: Wrong Answer

Solution code:
# 数値の取得
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

# 宿泊費の計算後結果を出力
account = (K * X) + ((N - K) * Y) 
print(account)

Submission status: Wrong Answer

Solution code:
# 数値の取得
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

# 宿泊費の計算後結果を出力
account = 0
cnt = 1
for cnt in range(1,K + 1,1):
  account = account + X
  
for cnt in range(K + 1,N + 1,1):
  account = account + Y
  
print(account)

Submission status: Wrong Answer

Solution code:
# 数値の取得
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

# 宿泊費の計算後結果を出力
account = 0
cnt = 1
for cnt in range(1,K + 1,1):
  account = account + X
  
for cnt in range(K + 1,N,1):
  account = account + Y
  
print(account)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

print(k*x + (n-k)*y)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())


print(k*x + (n-k)*y)

Submission status: Wrong Answer

Solution code:
print('aaa')

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
if n>k:
  print(x*k+y*(n-k))
else:
  print(x*k)

Submission status: Wrong Answer

Solution code:
# 1 軒のホテルがあります。 このホテルの宿泊費は、次のようになっています。
# 最初の K 泊までは、 1 泊あたり X 円 K + 1 泊目以降は、 1 泊あたり Y 円 高橋君は、このホテルに N 泊連続で宿泊することにしました。
# 高橋君の宿泊費は合計で何円になるか求めてください。

N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if N - K>= 1:
    print(X * K + Y * (N - K))

else:
    print(X * K)

Submission status: Wrong Answer

Solution code:
# 1 軒のホテルがあります。 このホテルの宿泊費は、次のようになっています。
# 最初の K 泊までは、 1 泊あたり X 円 K + 1 泊目以降は、 1 泊あたり Y 円 高橋君は、このホテルに N 泊連続で宿泊することにしました。
# 高橋君の宿泊費は合計で何円になるか求めてください。

N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if N - K>= 1:
    print((X * K) + (Y * (N - K)))

else:
    print(X * K)

Submission status: Wrong Answer

Solution code:
# 1 軒のホテルがあります。 このホテルの宿泊費は、次のようになっています。
# 最初の K 泊までは、 1 泊あたり X 円 K + 1 泊目以降は、 1 泊あたり Y 円 高橋君は、このホテルに N 泊連続で宿泊することにしました。
# 高橋君の宿泊費は合計で何円になるか求めてください。

N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if X > Y:
    print((X * K) + (Y * (N - K)))

Submission status: Wrong Answer

Solution code:
# 1 軒のホテルがあります。 このホテルの宿泊費は、次のようになっています。
# 最初の K 泊までは、 1 泊あたり X 円 K + 1 泊目以降は、 1 泊あたり Y 円 高橋君は、このホテルに N 泊連続で宿泊することにしました。
# 高橋君の宿泊費は合計で何円になるか求めてください。

N = int(input())
K = int(input())
X = int(input())
Y = int(input())

print((X * K) + (Y * (N - K)))

Submission status: Wrong Answer

Solution code:
N,K,X,Y= [int(input()) for i in range (4)]
yen1 = K * X
yen2 = (N - K) * Y
print(yen1 + yen2)

Submission status: Wrong Answer

Solution code:
n, k, x, y = (int(input()) for i in [0]*4)

print(x*k + (n-k)*y if n > k else x*k)

Submission status: Wrong Answer

Solution code:

n = int(raw_input())
k = int(raw_input())
p = int(raw_input())
q = int(raw_input())
print p + max(n - k,0) *q

Submission status: Wrong Answer

Solution code:
N=int(input())
K=int(input())
X=int(input())
Y=int(input())

if N<K:
    a=N*X
    b=0
else:
    a=K*Y
    b=(N - K) * Y

print(a+b)

Submission status: Wrong Answer

Solution code:
# 入力
n = int(input())
k = int(input())
x = int(input())
y = int(input())

# 処理
if n > k:
    first_stay = k * x
    second_stay = (n - k) * y
    total = first_stay + second_stay
    print(total)
elif n <= k:
    total = n * k
    print(total)

Submission status: Wrong Answer

Solution code:
# 入力
n = int(input())
k = int(input())
x = int(input())
y = int(input())

# 処理
if n >= k:
    first_stay = k * x
    second_stay = (n - k) * y
    total = first_stay + second_stay
elif n < k:
    total = n * k

print(total)

Submission status: Wrong Answer

Solution code:
# 入力
n = int(input())
k = int(input())
x = int(input())
y = int(input())

# 処理
first_stay = k * x
second_stay = (n - k) * y
total = first_stay + second_stay

print(total)

Submission status: Wrong Answer

Solution code:
N=int(input())
K=int(input())
X=int(input())
Y=int(input())

a=K*X
b = (N - K) * Y

print(a+b)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
C = 0
for i in range(1,N+1):
    if i <= K:
        C = C + X
    else:
        C = C + Y

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())


if n > k :
    print(k*x + y+(n-k))
else:
    print(n*y)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

fee1 = n * x
fee2 = y * (n - k)

if n > k :
    print(fee1 + fee2)
else:
    print(fee1)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

fee1 = n * x
fee2 = y * (n - k)

if n >= k :
    print(fee1 + fee2)
else:
    print(fee1)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

fee1 = k * x
fee2 = y * (n - k)

if n > k :
    print(fee1 + fee2)
else:
    print(fee1)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

fee1 = n * x
fee2 = y * (n - k)

if n > k :
    print(fee1)
else:
    print(fee1 + fee2)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

fee1 = n * x
fee2 = y * (n - k)

if n >= k :
    print(fee1)
else:
    print(fee1 + fee2)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

fee1 = k * x
fee2 = y * (n - k)

if k > n :
    print(fee1)
else:
    print(fee1 + fee2)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
if a>=b:
  print(int((c*b+d*(a-b))))
else:
  print(int(c*b))

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
if a>=b:
  print(int((c*b+d*(a-b))))
else:
  print(int(c*d))

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(int((c*b+d*(a-b))))

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(int((c*b+d*(b))))

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(int((c*(b-a)+d*(b))))

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(int((c*a)+d*(b-a)))

Submission status: Wrong Answer

Solution code:
list1 = []
for i in range(4):
    list1.append(int(input()))
else:
    print(list1[1]*list1[2]+(list1[0]-list1[1])*list1[3])

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
print(x*k + y*(n-k)) if n-k>=0 else print(x*k)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
print(x*k + y*(n-k))

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

KEI = K*X +(N-K)*Y
print(KEI)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())

if n-k>0:
    a=n-3
    b=a*y
    c=b+x*3
    print(c)
else:
    print(n*x)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
ans = 0

for i in range(1, N+1):
    if i < N-1:
        ans += X
    else:
        ans += Y
print(ans)

Submission status: Wrong Answer

Solution code:
# x, y = [int(input()) for i in range(2)]
n, k, x, y = [int(input()) for i in range(4)]

print(int(k * x + y * (n - k)))

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if N>=K:
    print(K*X+(N-K)*Y)
else:
    print(K*X)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

print(K*X+(N-K)*Y)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
ans = k*x
if k <= n:
    ans += (n -k)*y
print(ans)

Submission status: Wrong Answer

Solution code:
N= [int(input()) for n in range(4)]
print(N[1]*N[2]+(N[0]-N[1])*N[3])

Submission status: Wrong Answer

Solution code:
N= [int(input()) for n in range(4)]
print(N[0]*N[2]+(N[0]-N[1])*N[3])

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

print(X*K+Y*(N-K))

Submission status: Wrong Answer

Solution code:
N=int(input())
K=int(input())
X=int(input())
Y=int(input())
print(K*X+(N-K)*Y)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())

print(x*k+y*(n-k-1))

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())

print(x*k+y*(n-k))

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
print(x*k+y*max(n-k,0))

Submission status: Wrong Answer

Solution code:
def INT(): return int(input())
N = INT()
K = INT()
X = INT()
Y = INT()
print(K * X + (N - K) * Y)

Submission status: Wrong Answer

Solution code:
n_stay = int(input())
n_p1 = int(input())
p1 = int(input())
p2 = int(input())
 
print(n_p1 * p1 + max([n_stay - n_p1, 0]) * p2)

Submission status: Wrong Answer

Solution code:
n_stay = int(input())
n_p1 = int(input())
p1 = int(input())
p2 = int(input())

print(n_p1 * p1 + (n_stay - n_p1) * p2)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
a=k*x+(n-k)*y
print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

if n < k:
  p = (n-k)*y
else:
  p = 0
  
print(k*x +p)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

a = k*x + (n-x)*y

print(a)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
print(k*x+(n-k)*y)

Submission status: Wrong Answer

Solution code:
total_nights = int(input())
first_nights = int(input())
first_rate = int(input())
extra_rate = int(input())

total = (first_nights * first_rate) + ((total_nights - first_nights) * extra_rate)
print(total)

Submission status: Wrong Answer

Solution code:
total_nights = int(input())
first_nights = int(input())
first_rate = int(input())
extra_rate = int(input())

total = (first_nights * first_rate) + ((total_nights - first_nights) * extra_rate)

Submission status: Wrong Answer

Solution code:
num1 = int(input())
num2 = int(input())
num3 = int(input())
num4 = int(input())

if num1>num2:
  print(num1*num3+(num2-num1)*num4)
else:
  print(num1*num3)

Submission status: Wrong Answer

Solution code:
n, k, x, y = (int(input()) for i in range(4))
if k <= n:
  print(n*x)
else:
  print(k*x + (n-k)*y)

Submission status: Wrong Answer

Solution code:
n, k, x, y = (int(input()) for i in range(4))
if k <= n:
  print(k*x)
else:
  print(k*x + (n-k)*y)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
total = X*K + Y*(N-K)
print(total)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
print(K*X + (N-K)*Y)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())

ans = k*x + (n-k)*y
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
x = int(input())
y = int(input())

if N <= K:
  print(N*x)
else:
  print(K*x + (K-N)*y)

Submission status: Wrong Answer

Solution code:
N=int(input())
K=int(input())
X=int(input())
Y=int(input())
result= (K * X )+ Y * (N-K)
print("% d"%result)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
print(k*x+(n-k)*y)

Submission status: Wrong Answer

Solution code:
n,k,x,y=[int(input()) for _ in range(4)]
print(x*k+x*max(0,n-k))

Submission status: Wrong Answer

Solution code:
s=input()
print('Yes'if all(s.count(i)%2==0for i in s)else'No')

Submission status: Wrong Answer

Solution code:
s = input()

r = 'Yes'
for w in s:
  if s.count(w) % 2 == 1:
    r = 'No'
    break
print(r)

Submission status: Wrong Answer

Solution code:
N=int(input())
K=int(input())
X=int(input())
Y=int(input())
if N>=K:
  print(X*K+(N-K)*Y)
else:
  print(X*K)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
k = int(input())
x = int(input())
y = int(input())
if n > k:
    ans = (k*x) + (n-k)*y
else:
    ans = (k*x)
print(ans)

Submission status: Wrong Answer

Solution code:
a = list(input())
even_number = [x for x in range(0,101,2)]
tmp_list = []
tmp_set = set(a)

tmp_list = [a.count(x) for x in tmp_set]
if all(x % 2 == 0 for x in tmp_list) == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = 0

for i in range(1,a+1):
  if i >= b:
    e += d
  else:
    e += c
print(e)

Submission status: Wrong Answer

Solution code:
N, K, X, Y = [int(input()) for i in range(4)]

print("{} {} {} {}".format(N, K, X, Y))

res = X * K + Y * (N - K)

print(res)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
sum_=0
if n-k>=0:
    sum_=k*x+(n-k)*y
else:
    sum_=k*x
print(sum_)

Submission status: Wrong Answer

Solution code:
n = 4

N, K, X, Y = [int(input()) for i in range(4) ]

zenhan = K * X

kouhan = (N - K ) * Y

total = zenhan + kouhan

print(total)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

# ケアレスミスしないように一旦紙に式を書くこと

n = int(input())
k = int(input())
x = int(input())
y = int(input())

print((k * x) + ((n - k) * y if (n - k) > 0 else 0))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

n = int(input())
k = int(input())
x = int(input())
y = int(input())

print((k * x) + ((n - k) * y if (n - k) >= 0 else 0))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

n = int(input())
k = int(input())
x = int(input())
y = int(input())

print((n * x) + ((n - k) * y if (n - k) >= 0 else 0))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

n = int(input())
k = int(input())
x = int(input())
y = int(input())

print((n * x) + ((n - k) * y if (n - k) > 0 else 0))

Submission status: Wrong Answer

Solution code:
def hotel():
    k=int(input())
    c=int(input())
    x=int(input())
    y=int(input())

    print(k*x+(c-k)*y)

hotel()

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())

X = int(input())
Y = int(input())

print(K*X + max(0,(N-K))*Y)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())

X = int(input())
Y = int(input())

print(N*X + max(0,(N-K))*Y)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())

X = int(input())
Y = int(input())

print(N*X + (N-K)*Y)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
Sum = K*X+(N-K)*Y
print(Sum)

Submission status: Wrong Answer

Solution code:
def hotel():
    n = int(input())
    k = int(input())
    x = int(input())
    y = int(input())
    first = x * k
    later = y * (n - k)
    if k > n:
        first = x * n
        later = 0
    print(n, k, x, y, first, later)
    print(first + later)

hotel()

Submission status: Wrong Answer

Solution code:
def hotel():
    n = int(input())
    k = int(input())
    x = int(input())
    y = int(input())
    first = x * k
    later = y * (n - k)
    print(first + later)

hotel()

Submission status: Wrong Answer

Solution code:
a,b,c,d=[int(input()) for i in range(4)]
print(c*min(a,b)+d*max(b-a,0))

Submission status: Wrong Answer

Solution code:
n,k,x,y = [int(input()) for i in range(4)]
print(n*x+abs(n-k)*y)

Submission status: Wrong Answer

Solution code:
n = input('N:')
k = input('K:')
x = input('X:')
y = input('Y:')

n = int(n)
k = int(k)
x = int(x)
y = int(y)

if n >= k:
    total = k * x + (n - k) * y
else:
    total = n * x
    
print(total)

Submission status: Wrong Answer

Solution code:
a, b, c, d= [int(input()) for i in range(4)]

print(b*c+(d*(a-b)))

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())
    k = int(input())
    x = int(input())
    y = int(input())

    res = k * x + (n - k) * y
    print(res)


if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

print(x*k+y*max(n-k,0))

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

print(x*k+y*max((n-k),0))

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

print(K * X + Y * (N - K))

Submission status: Wrong Answer

Solution code:
N=int(input())
K=int(input())
X=int(input())
Y=int(input())

if N<=K:
  print(K*N)
else:
  print(X*K+(N-K)*Y)

Submission status: Wrong Answer

Solution code:
N=int(input())
K=int(input())
X=int(input())
Y=int(input())

print(K*X+(N-K)*Y)

Submission status: Wrong Answer

Solution code:
n, k, x, y = [int(input()) for _ in range(4)]
if n >= k:
    print(x*k + y*(n-k))
else:
    print(x*k)

Submission status: Wrong Answer

Solution code:
n,k,x,y = [int(input()) for i in range(4)]
print(k*x+max(n-k,0)*y)

Submission status: Wrong Answer

Solution code:
n, k, x, y = map(int, [input() for i in range(4)])

total = k*x + (n-k)*y

print(total)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

print(K*X+(N-K)*Y)

Submission status: Wrong Answer

Solution code:
N=int(input())
K=int(input())
X=int(input())
Y=int(input())

print(X*K+(N-K)*Y)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

f_normal = x * k
f_addition = f_normal + (n - k) * y

if n <= k:
  print(f_normal)
else:
  print(f_addition)

Submission status: Wrong Answer

Solution code:
# -*- coding : utf-8 -*-

n = int(input())
k = int(input())
x = int(input())
y = int(input())

if n <= k :
  print(x * n)
else:
  print(x*k + y * (x-k))

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

ans = K*X+(N-K)*Y
print(ans)

Submission status: Wrong Answer

Solution code:
hotel=int(input())
hotel2=int(input())
hotel3=int(input())
hotel4=int(input())
 
sum1=int(hotel2)*int(hotel3)
hotel5=int(hotel)-int(hotel2)
sum2=int(hotel5)*int(hotel4)
fee=int(sum1)+int(sum2)
 
print(str(fee))

Submission status: Wrong Answer

Solution code:
hotel=int(input())
hotel2=int(input())
hotel3=int(input())
hotel4=int(input())
 
sum1=int(hotel)*int(hotel3)
sum2=int(hotel2)*int(hotel4)
fee=int(sum1)+int(sum2)
 
print(str(fee))

Submission status: Wrong Answer

Solution code:
from collections import Counter
w = input()
cnt = Counter(w)
ans = 'Yes'
for i in cnt.values():
    if i % 2 !=0:
        ans = 'No'
print(ans)

Submission status: Wrong Answer

Solution code:
#合計宿泊数
N = input()
#通常宿泊数
K = input()
#通常宿泊費
X = input()
#割引宿泊費
Y = input()
#宿泊日数カウント
S = 1
#合計金額カウント
P = 0

#通常宿泊出力
while S <= int(K):
    P = P + int(X)
    S = S + 1

#割引宿泊出力
while S <= int(N):
    P = P + int(Y)
    S = S + 1

#合計金額出力
print(P)

Submission status: Wrong Answer

Solution code:
#合計宿泊数
N = input()
#通常宿泊数
K = input()
#通常宿泊費
X = input()
#割引宿泊費
Y = input()
#宿泊日数カウント
S = 1

#通常宿泊出力
while S <= int(K):
    print(str(S)+'泊目は'+X+'円')
    S = S + 1

#割引宿泊出力
while S <= int(N):
    print(str(S)+'泊目は'+Y+'円')
    S = S + 1

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

sum_a = X * K
if N < K:
    sum_b = 0
else:
    sum_b = Y * (N-K)

print(sum_a + sum_b)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

sum_a = X * K
sum_b = Y * (N-K)

print(sum_a + sum_b)

Submission status: Wrong Answer

Solution code:
n, k, x, y = [int(input()) for i in [0]*4]

print(n*x - (n-k) * (x-y))

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
a = 0
b = 0
c = 0
e = 0

if n <= k:
    a = n * x
else:
    c = n - k
    b = c * y

e = a + b
print(e)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
a = 0
b = 0
c = 0
e = 0

for i in range(k):
    a = k * x

b = n - k

for d in range(b):
    c = b * y

e = a + c
print(e)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
a = 0
b = 0
c = 0

for i in range(k):
    a = k * x

b = n - k

for d in range(b):
    c = b * y

e = a + c
print(e)

Submission status: Wrong Answer

Solution code:
N = [int(input()) for i in range(4)]
print('宿泊費は次のようになります。')
if N[0] <= N[1]:
  for i in range(N[0]):
    print('・' + str(i+1) + '泊目は' + str(N[2]) + '円')
  print('したがって、合計は' + str(N[2] * N[0]) + '円です。')
else:
  for i in range(N[1]):
    print('・' + str(i+1) + '泊目は' + str(N[2]) + '円')
  for i in range(N[0] - N[1]):
    print('・' + str(N[0] + i+1) + '泊目は' + str(N[3]) + '円')
  print('したがって、合計は' + str(N[2] * N[1] + N[3] * (N[0] - N[1])) + '円です。')

Submission status: Wrong Answer

Solution code:
N = [int(input()) for i in range(4)]
if N[0] >= N[1]:
  for i in range(N[0]):
    print(str(i+1) + '泊目は' + str(N[2]) + '円です')
else:
  for i in range(N[0]):
    print(str(i+1) + '泊目は' + str(N[2]) + '円です')
  for i in range(N[1] - N[0]):
    print(str(N[0] + i+1) + '泊目は' + str(N[3]) + '円です')

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

print(int((K*X)+(N-K)*Y))

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

print((K*X)+(N-K)*Y)