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

retval = 0
for i in range(N+1):
    if i <= K:
        retval += X
    else:
        retval += Y
print(retval)

Submission status: Wrong Answer

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

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

ans = min(K, N) * X + min(abs(N - K), 0) * Y

print(ans)

Submission status: Wrong Answer

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

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 < 0:
    print(x*k+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())

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*K)
else:
  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,k,x,y=(int(input()) for i in [0]*4)
print(n*x-(x-y)*max(k-n,0))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print = (price)

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())
n_ = int(input())
m = int(input())
m_ = int(input())

count = 0

if n > n_:
  N = n-n_
  for i in range(N):
    count += m
  for x in range(n_):
    count += m_

else:
  count += n*m
  
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
n_ = int(input())
m = int(input())
m_ = int(input())

count = 0
N = n-n_
for i in range(N):
  count += m
  
for x in range(n_):
  count += m_

print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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(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(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+min(0,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:
  ans = k*x+(n-k)*y
else:
  ans = k*x
print(ans)

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

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

Submission status: Wrong Answer

Solution code:
w = input()
w_list = 'abcdefghijklmnopqrstuvwxyz'
a=0
for i in w_list:
    if w.count(i)%2==0:
        a+=0
    else:
        a+=1
if a==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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 = list(raw_input())
flag = True


for i in range(ord('a'), ord('z')+1):
    if int(N.count(chr(i))) %2 == 1 :
        flag = False
        break
if flag:
    print "YES"
else:
    print "NO"

Submission status: Wrong Answer

Solution code:
w = input()
only = list(set(w))
count = 0
can = True
for i in only:
    if w.count(i) % 2 != 0:
        can = False
        break
if can:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
w = input()
for i in set(w):
    if w.count(i)%2 == 1:
        print("No")
        exit()

print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = K
b = K - N
c = N

if b > 0:
  print(a * X + b * Y)
else:
  print(c * X)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

#　K泊までX円　K+1泊からY円
print(K * X + (N - K) * Y)

Submission status: Wrong Answer

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

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:
w = input()
w_set = set( w )
for each_ch in w_set:
	if w.count( each_ch ) % 2 == 1:
		print( "No" )
		exit()

print( "Yes" )

Submission status: Wrong Answer

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

e = n - k

if e <= 0:
    e = 0
    
print(k*x+e*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:
# -*- coding: utf-8 -*-


if __name__ == '__main__':
    n, k, x, y = [int(input()) for _ in range(4)]
    print(k * x + (n - k) * y)

Submission status: Wrong Answer

Solution code:
import sys
 
nN = int(input())
nK = int(input())
nX = int(input())
nY = int(input())
 
nE = 0
nAns = 0
 
if nN <= nK:
  nAns = nX * nN
  print(nAns)
  sys.exit()
  
nE = nN - nK
 
nAns = (nX * nN) + (nY * nE)
print(nAns)

Submission status: Wrong Answer

Solution code:
import sys
 
nN = int(input())
nK = int(input())
nX = int(input())
nY = int(input())
 
nE = 0
nANs = 0
 
if nN <= nK:
  nAns = nX * nN
  print(nAns)
  sys.exit()
  
nE = nN - nK
 
nAns = nX * nN + nY * nE
print(nAns)

Submission status: Wrong Answer

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

print(fee)

Submission status: Wrong Answer

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

if k <= n:
  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(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())

ans = (k * x) + (y * (n - k))
print("{}".format(ans))

Submission status: Wrong Answer

Solution code:
import sys
W = input()
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
for num in alpha:
    if W.count(num) %2 != 0:
        print("No")
        sys.exit()
print("yes")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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 -*-

def solve():
    N = int(input())
    K = int(input())
    X = int(input())
    Y = int(input())

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

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
N, K, X, Y = map(int,stdin.read().splitlines())
if N<=K:
  print(X*K)
else:
  print(X*K+Y*(N-K))

Submission status: Wrong Answer

Solution code:
from sys import stdin
N, K, X, Y = map(int,stdin.read().splitlines())
if N>=K:
  print(X*K + Y*(N-K))
else:
  print(X*K)

Submission status: Wrong Answer

Solution code:
from sys import stdin
N, K, X, Y = map(int,stdin.read().splitlines())
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)
else:
    print(x*k + y*(n-k))

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:
    print( K*X + (N-K)*Y )
else:
    print( N*X )

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import collections

w = input()
arr = list(w)
dic = collections.Counter(arr)
for i in dic.values():
    if i % 2 != 0:
        print("No")
        break
else:
    print("Yes")

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:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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(Y*N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
k = input()
x = input()
y = input()
a = n - k
b = x * k + y * a
if k >= n:
    print x * k
elif k < n:
    print b

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

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

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

ans = 0

for i in range(K):
  ans += X

for i in range(N-K):
  ans += Y

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())
ans = 0
nk = n - k

if 0 < nk:
    ans = (nk+1) * x + (k-1) * 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())
ans = 0
nk = n - k

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

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 i in range(4)]
print(k * x + (n - k) * y)

Submission status: Wrong Answer

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

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:
all_days=int(input())
days1=int(input())
sp_p=int(input())
n_p=int(input())
ans = 0

if all_days <= days1:
    ans = sp_p * days1
else:
    ans = days1 * sp_p + (all_days-days1) * n_p

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=int(input())
sp_p=int(input())
n_p=int(input())
sum = 0

for i in range(k):
    sum += sp_p

for j in range(n-k):
    sum += n_p

print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k,x,y=map(int,open(0))
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())
a=b=i=0
for i in range(k):
   a+=x
   i+=1
i=0
for i in range(n-k):
   a+=y
   i+=1
print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
data=[]
for i in range(4):
 	data.append(int(input()))

c=data[1]*data[2]+(data[0]-data[1])*data[3]
 	
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l = [int(input()) for i 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())

amount = 0

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

print(amount)

Submission status: Wrong Answer

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

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

    print(sum)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

    print(sum)

if __name__ == "__main__":
    main()

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:
  ans = n*x
else:
  ans = k*x + (n-k)*y

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def solve(N,K,X,Y):
    print(X*K + Y*(N-K))

if __name__ == '__main__':
    N = int(input())
    K = int(input())
    X = int(input())
    Y = int(input())
    
    solve(N,K,X,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:
from collections import Counter

w=list(str(input()))
h=set(w)

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

print("Yes")

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
total = int(input())
limit = int(input())
first = int(input())
second = int(input())
print(limit * first + (total - limit) * second)

Submission status: Wrong Answer

Solution code:
total = int(input())
limit = int(input())
first = int(input())
second = int(input())
print(limit * first + (total - limit + 1) * second)

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

Submission status: Wrong Answer

Solution code:
mojiretsu = input()
lett = list(mojiretsu)
numlist = []
for i in lett:
    num = lett.count(i)
    numlist += [num]
jud = []
for i in numlist:
    if i%2 == 0:
        jud += ['Yes']
    else:
        jud += ['No']

anslist = [x for x in set(jud) if jud.count(x) > 1]
anslisT = [x for x in jud if jud.count(x) == 1]

if anslist == ['Yes']:
    print('Yes')
elif anslisT == ['Yes']:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, K, X, Y = (int(input()) for _ in range(4))
result = K * X + (N-K) * Y
print(result)

Submission status: Wrong Answer

Solution code:
def tak_and_hotels(N: int, K: int, X: int, Y: int) -> int:
    return K * X + max(0, N - K) * Y


if __name__ == "__main__":
    N = int(input())
    K = int(input())
    X = int(input())
    Y = int(input())
    ans = tak_and_hotels(N, K, X, Y)
    print(ans)

Submission status: Wrong Answer

Solution code:
def tak_and_hotels(N: int, K: int, X: int, Y: int) -> int:
    return K * X + (N - K) * Y


if __name__ == "__main__":
    N = int(input())
    K = int(input())
    X = int(input())
    Y = int(input())
    ans = tak_and_hotels(N, K, X, 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(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 :
  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())

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

print(i)

Submission status: Wrong Answer

Solution code:

w = input()
dct_str = dict.fromkeys(w, 0)
 
for alp in w:
    dct_str[alp] += 1
flag = True
for alp in dct_str.keys():
    if dct_str[alp] % 2 != 0:
        flag = False
 
if flag == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# n,k,x,y = map(int, input().split())
n = int(input())
k = int(input())
x = int(input())
y = int(input())

reg_days = k
discouted_days = n - k
cost = (reg_days * x) + (discouted_days * y)
print(cost)

Submission status: Wrong Answer

Solution code:
# n,k,x,y = map(int, input().split())
n = int(input())
k = int(input())
x = int(input())
y = int(input())

reg_days = k
discouted_days = n - k
cost = (reg_days * x) + (discouted_days + y)
print(cost)

Submission status: Wrong Answer

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


for i in range(N):
    if K>=N+1:
        sum1 += X
    else:
        sum1 += Y

print(sum1)

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 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())
print(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())
print(x*k+y*max(0,n-k))

Submission status: Wrong Answer

Solution code:
n,k,x,y = [int(input()) for _ in '1'*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(X*K+max(0,(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:
String = str(input())

# setで重複を無くし，ビット演算でカウントする
# ビット演算，2進数で奇数を表した場合、最後の1桁は必ず1
## print(char.count(String) & 1)
result = {}
for char in String:
    try:
        result[char] += 1
    except KeyError:
        result[char] = 1

result = list(map(lambda x: x % 2, list(result.values())))
if result == [0] * len(result):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
w = input()
print('Yes') if sum([int(w.count(chr(x))%2) for x in range(97,97+26)])==0 else print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(4)]
ans = 0

for i in range(1,a[0]+1):
  if i<a[1]:
    ans += a[2]
  else:
    ans += a[3]

print(ans)

Submission status: Wrong Answer

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

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

normal = N - K + 1
extra = K - 1
if normal <= 0:
	normal = N
	extra = 0

print(normal*X + extra*Y)

Submission status: Wrong Answer

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

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

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=input()
for i in N:
  if N.count(i)%2==0:
    pass
  else:
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if(N <= K):
    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 [0]*4)
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(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(k*x if n<=k else (k*x+(n-k)*x))

Submission status: Wrong Answer

Solution code:
max_day, change_day, pay, discount_pay = [int(input()) for _ in range(4)]
pay_change_day = max_day - change_day
payment = 0

for i in range(change_day):
    payment += pay
if pay_change_day > 0:
    for v in range(pay_change_day):
        payment += discount_pay

print(payment)

Submission status: Wrong Answer

Solution code:
max_day, change_day, pay, discount_pay = [int(input()) for _ in range(4)]
pay_change_day = max_day - change_day
payment = 0
print(pay_change_day, payment)

for i in range(change_day):
    payment += pay
if pay_change_day > 0:
    for v in range(pay_change_day):
        payment += discount_pay

print(payment)

Submission status: Wrong Answer

Solution code:
# ABC 044 A - 高橋君とホテルイージー / Tak and Hotels (ABC Edit)
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(n*x if n<=k else n*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(1,N):
  if i<= K:
    ans += X
  else:
    ans += Y
print(ans)

Submission status: Wrong Answer

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

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