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())

result = K * X + (N-K) * Y
print(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=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:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
if n<k:
    print(n*y)
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:
    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*n)

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())
print(K*X + max((N-K),0)*Y)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,K,X,Y = [int(input()) for i in range(4)]
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 = 0
for i in range(n+1):
    if i < k:
        ans += x
    else:
        ans += y
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
t=set(list(s))
for i in t:
  if s.count(i)%2!=0:
    print('No')
    exit(0)
print('Yes')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
w = input()
print(['Yes', 'No'][any(w.count(c) % 2 for c in set(w))])

Submission status: Wrong Answer

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

if n < k:
  print(x*n)
else:
  print(x*n+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*(N-K)*(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*n)

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:
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())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
x = 0
for i in range(b):
    x = x + c
for i in range(a - b):
    x = x + d
print(x)

Submission status: Wrong Answer

Solution code:
n,k,x,y=map(int,open(0));print(n*x-(x-y)*(k-1)if n>k else n*x)

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    w=list(input())
    w.sort()
    if len(w)%2!=0:
        print('No')
    else:
        for i in range(0,len(w),2):
            if w[i]!=w[i+1]:
                print('No')
                break
        print('Yes')
resolve()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

lis = [int(input()) for _ in range(4)]

print(lis[1]*lis[2] + (lis[0]-lis[1])*lis[3])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, k, x, y = [int(a) for a in range(4)]
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 n < k:
  print(x * n + y * (k - n))
else:
  print(x * n)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

sum=0

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

print(sum)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

P=N-K

if P>0:
    print(P*Y+K*X)
else:
    print(K*X)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
b=int(input())
c=int(input())

print(n*b+max(0,n-a)*c)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
b=int(input())
c=int(input())

print(n*b+min(0,n-a)*c)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
b=int(input())
c=int(input())

print(n*b+min(0,n-b)*c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
if n-k<0:
  k=0
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)+(y*(n-k)))

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())

s1=k*x
d1=n-k
s2=d1*y
print(s1+s2)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
ans = X * min(N, K) + Y * max(N - K, 0)

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:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

AC=0

if N > K:
    for _ in range(K):
        AC += X
    
    for _ in range(N-K):
        AC += Y

    print(AC)

else:
    for _ in range(K):
        AC += X
        print(AC)

Submission status: Wrong Answer

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

P=N-K


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
ans=0
if a<=b:
    ans=b*c
else:
    ans=b*c+(a-b)*d
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-k+1)*x + (k-1)*y)
else:
    print(n*x)

Submission status: Wrong Answer

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

first = K*X
after = Y*(N-K)

print(first + after)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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 (n*k+y*(n-k))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k,x,y = map(int, open(0))
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 = K*X + (N-K)*Y

print(total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(4)]
if a[1] > a[2]:
    ans = a[1] * a[2] + (a[0]-a[1]) *  a[3]
else:
    ans = a[0] * a[2]

print(str(ans))

Submission status: Wrong Answer

Solution code:
N,K,X,Y = [int(input()) for i in range(4)]
if N>K:
  total = N*X- (K-1)*(X-Y)
  print(total)
else:
  total = N*X
  print(total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x=[]
for i in range(0,4):
  x.append(int(input()))
s=0
for j in range(0,x[0]):
  if j+1<x[1]:
    s+=x[2]
  else:
    s+=x[3]
    
print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(cost)

Submission status: Wrong Answer

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

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

print(cost)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

total = 0

for i in range(N):
    if i <= K:
        total += X
    else:
        total += Y

print(total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=input()
k=input()
x=input()
y=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())
if N<=K:
  print(X*N)
else:
  print(X*N+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)
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 N<=K:
  print(int(K*X))
else: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())
ans=0

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())
res = N * X
if N>K:
  res += (N-K) * Y

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#ABC044.B
w = input()
L = list(w)

cnt = 0
for i in L:
    if L.count(i)%2==1:
        cnt += 1
if cnt ==0:
    print('Yes')
else:
    print('No')

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:
#abc044 a
n=int(input())
k=int(input())
x=int(input())
y=int(input())
ans=x*k+y*(n-k)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
w = list(input())
ans = "Yes"
for i in w:
	if int(w.count(i))%2 == 1:
		ans = 'No'
		break
	if int(w.count(i))%2 == 0:
		continue
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
a=int(input())
b=int(input())
print(min(n-k,k)*a+max(0,n-k)*b)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
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())
sum = 0
for i in range(K):
    sum += X
for i in range(K,N):
    sum += Y
print(sum)

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())
t=n-k
if t<0:
  t=0
print(k*x+t*y)

Submission status: Wrong Answer

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

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

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(n*y)

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(n+y)

Submission status: Wrong Answer

Solution code:
#044_A
n,k,x,y=(int(input()) for _ in range(4))
print(x*k+y*(n-k))

Submission status: Wrong Answer

Solution code:
n = int(input())
s = int(input())
x = int(n**0.5)+1
def dsum(x,t):
  ret = 0
  while x>0:
    ret += x%t
    x //= t
  return ret
if n == s:
  print(n+1)
  exit()
for i in range(2,x+1):
  if dsum(n,i) == s:
    print(i)
    exit()
for i in range(x,0,-1):
  if (n-(s-i))%i == 0:
    digit = (n-(s-i))//i
    if 0 < i < digit and 0 <= s-i < digit:
      print((n-(s-i))//i,i)
      exit()
print(-1)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
h = int(input())

one = int(a + b)
two = int(one/2)
ans = int(two*h)

print (ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/use/bin/env python3

(n, k, x, y) = [int(input()) for _ in range(0, 4)]

ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
#!/use/bin/env python3

(n, k, x, y) = [int(input()) for _ in range(0, 4)]

ans = 0

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

Solution code:

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

sum = 0
for i in range( n ):
    if i ==1 :
        sum += x
    else :
        sum += y
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

K2 = N - K
if K2 < 0:
    K = 2
    K2 = 0

val = X * K + Y * K2
print(val)

Submission status: Wrong Answer

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

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,k,x,y = [int(input()) for i in range(4)]
print(x*k+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)
else:
    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:
    total = K*X + (N-K)*Y
    print(total)
else:
    total = K*X
    print(total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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())
 
before = int(input())
after = int(input())

if N - K < 0:
  after_value = 0
else:
  after_value = N-K

result = K*before + after_value*after
 
print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())
K = int(input())
 
before = int(input())
after = int(input())
 
 
result = K*before + (N-K)*after
 
print(result)

Submission status: Wrong Answer

Solution code:
X,A,B=[int(input()) for i in range(3)]
x=0
XX=X-A
while XX>0:
    XX-=B
    x+=1

print(X-A-B*(x-1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys
import itertools

import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, K, X, Y = map(int, read().split())

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

Submission status: Wrong Answer

Solution code:
n, k, x, y = [int(input()) for i in range(4)]
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:
a = int(input())
b = int(input())
c = int(input())
d = int(input())

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

Submission status: Wrong Answer

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

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

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())
p = 0

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

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,k,x,y = [int(input()) for i in range(4)]
ans = 0
ans += x * k
ans += y * (n-k)
print(ans)

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:
# -*- coding: utf-8 -*-
N,K,X,Y= [int(input()) for i in range(4)]
if N>K:
    print(K*X+(N-K)*Y)
elif N<=K:
    print(K*X)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N,K,X,Y= [int(input()) for i in range(4)]
if N>K:
    print(K*X+(N-K)*Y)
else:
    print(K*X)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(N):
    A = A + X
if K < N:
    A = A + Y
    
print(A)

Submission status: Wrong Answer

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

for i in range(K):
    A = A + X
if K < N:
    A = A + Y
    
print(A)

Submission status: Wrong Answer

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

for i in range(K):
    A = A + X
for j in range(N-K):
    A = A + Y

print(A)

Submission status: Wrong Answer

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

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

print(A)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
if n <= k:
    print(n*y)
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())

print(N * X + 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 * max(N - K,0))

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(K*X)

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 = list(input())

for i in n:
    if n.count(i)%2 != 0:
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
n = list(input())

for i in n:
    if n.count(i)%2 != 0:
        print("N0")
        exit()
print("Yes")

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)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
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())
if n <= k:
    print(n*x)
else:
    print(n*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:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N, K, X, Y=[int(input()) for i in range(4)]
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(x * n)
else:
  print(k * n +(n-k) * y)

Submission status: Wrong Answer

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

ac_fee = 0

for i in range(1, K+1):
    ac_fee += X
    
for j in range(K+1, N+1):
    ac_fee += Y
    
print(ac_fee)

Submission status: Wrong Answer

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

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())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
NKXY = [int(input()) for i in range(4)]
total=0
for i in range(NKXY[0]):
  if i<=NKXY[1]:
    total += NKXY[2]
  else:
    total += NKXY[3]
print(total)

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 + (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())
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,K,X,Y = (int(input()) for _ in range(4))

if N <= K:
    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())

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import sys


def main(argv=sys.argv):

    char_list = input()

    char_set = set(char_list)

    for char in char_set:

        if char_list.count(char) % 2 != 0:

            print('No')

            return 0

    print('Yes')

    return 0


if __name__ == '__main__':
    sys.exit(main())

Submission status: Wrong Answer

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

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

print(a)

Submission status: Wrong Answer

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

if N <= K:
    a = N * X
else:
    a = K * X

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

print(c)