s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
int64
0
100
memory
stringlengths
4
6
code_size
int64
15
14.7k
code
stringlengths
15
14.7k
problem_id
stringlengths
6
6
problem_description
stringlengths
358
9.83k
input
stringlengths
2
4.87k
output
stringclasses
807 values
__index_level_0__
int64
1.1k
1.22M
s900829079
p04011
u357630630
1566605270
Python
Python (3.4.3)
py
Accepted
17
2940
116
N, K, X, Y = map(int, [input() for i in range(4)]) if N <= K: print(X * N) else: print(K * X + (N - K) * Y)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,571
s214838698
p04011
u555356625
1566598333
Python
Python (3.4.3)
py
Accepted
17
2940
120
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n > k: print(k*x + (n-k)*y) else: print(n*x)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,572
s554472164
p04011
u234631479
1566533156
Python
Python (3.4.3)
py
Accepted
17
2940
115
n,k,x,y = int(input()),int(input()),int(input()),int(input()) if n < k: print(n*x) else: print(n*x-(x-y)*(n-k))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,573
s160634389
p04011
u640603056
1566528694
Python
Python (3.4.3)
py
Accepted
17
2940
135
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n > k: cost = k*x + (n-k)*y else: cost = n*x print(cost)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,574
s802913786
p04011
u717626627
1566521955
Python
Python (3.4.3)
py
Accepted
17
2940
131
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n - k >= 0: print(k * x + (n-k) * y) else: print(n * x)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,575
s039619393
p04011
u717626627
1566521906
Python
Python (3.4.3)
py
Accepted
17
2940
131
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n - k >= 0: print(k * x + (n-k) * y) else: print(n * x)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,576
s427866150
p04011
u329143273
1566511697
Python
Python (3.4.3)
py
Accepted
17
2940
91
n,k,x,y=[int(input()) for _ in range(4)] if k>=n: print(n*x) else: print(k*x+((n-k)*y))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,577
s111080144
p04011
u703890795
1566509206
Python
Python (3.4.3)
py
Accepted
17
2940
106
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) print(X * min(K, N) + Y * max(N-K, 0))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,578
s420677495
p04011
u642120132
1566503822
Python
Python (3.4.3)
py
Accepted
17
2940
93
n, k, x, y = [int(input()) for i in range(4)] print(k * x + (n - k) * y if n >= k else n * x)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,579
s708572155
p04011
u602252807
1566491270
Python
Python (3.4.3)
py
Accepted
17
2940
126
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)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,580
s815254437
p04011
u832058515
1566438235
Python
Python (3.4.3)
py
Accepted
18
2940
337
stay = int(input()) plan_change_day =int(input()) high_price=int(input()) low_price=int(input()) def main(): if stay - plan_change_day > 0: cost = high_price * plan_change_day + low_price * (stay - plan_change_day) print(int(cost)) else: cost = high_price * stay print(int(cost)...
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,581
s632972993
p04011
u762540523
1566420730
Python
Python (3.4.3)
py
Accepted
17
2940
90
n=int(input()) k=int(input()) x=int(input()) y=int(input()) print(min(n,k)*x+max(0,n-k)*y)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,582
s122803651
p04011
u625963200
1566406956
Python
Python (3.4.3)
py
Accepted
17
3060
173
inputs=[int(input()) for _ in range(4)] if inputs[0]>inputs[1]: ans=inputs[2]*inputs[1] ans+=inputs[3]*(inputs[0]-inputs[1]) else: ans=inputs[2]*inputs[0] print(ans)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,583
s626371691
p04011
u920438243
1566365093
Python
Python (3.4.3)
py
Accepted
17
2940
152
num = [int(input()) for i in range(4)] if num[0] <= num[1]: sum = num[0]*num[2] else: sum = num[1]*num[2]+(num[0]-num[1])*num[3] print(sum)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,584
s498318603
p04011
u040033078
1566359117
Python
Python (3.4.3)
py
Accepted
17
2940
126
a = int(input()) b = int(input()) c = int(input()) d = int(input()) if a < b: print(a * c) else: print((a-b) * d + b * c)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,585
s719897404
p04011
u347267726
1566338626
Python
Python (3.4.3)
py
Accepted
18
2940
107
n,k,x,y=(int(input()) for i in [0]*4) #print(n*x if n<=k else (k*x)+((n-k)*y)) print(n*x-(x-y)*max(n-k,0))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,586
s669333459
p04011
u347267726
1566338593
Python
Python (3.4.3)
py
Accepted
17
2940
77
n,k,x,y=(int(input()) for i in [0]*4) print(n*x if n<=k else (k*x)+((n-k)*y))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,587
s428122650
p04011
u347267726
1566338394
Python
Python (3.4.3)
py
Accepted
17
2940
99
n=int(input()) k=int(input()) x=int(input()) y=int(input()) print(n*x if n<=k else (k*x)+((n-k)*y))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,588
s748575438
p04011
u771405286
1566336705
Python
Python (3.4.3)
py
Accepted
19
2940
182
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) retval = 0 for i in range(1, N+1): if i <= K: retval += X else: retval += Y print(retval)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,589
s947911947
p04011
u437638594
1566328941
Python
Python (3.4.3)
py
Accepted
18
2940
120
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N > K: print(K*X + (N-K)*Y) else: print(N*X)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,590
s849847821
p04011
u113003638
1566274935
Python
Python (3.4.3)
py
Accepted
17
2940
96
a,b,c,d = [int(input()) for i in range(4)] if a > b: print(b*c+(a-b)*d) else: print(a*c)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,591
s424665521
p04011
u113003638
1566274911
Python
Python (3.4.3)
py
Accepted
17
2940
96
a,b,c,d = [int(input()) for i in range(4)] if a > b: print(b*c+(a-b)*d) else: print(a*c)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,592
s169372778
p04011
u077898957
1566269167
Python
Python (3.4.3)
py
Accepted
17
2940
75
n,k,x,y = [int(input()) for i in range(4)] print(n*x-(x-y)*(max(0,(n-k))))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,593
s000242910
p04011
u521866787
1566228289
Python
Python (3.4.3)
py
Accepted
17
2940
98
n = int(input()) k = int(input()) x = int(input()) y = int(input()) print(n*x - (x-y)*max(n-k,0))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,594
s377599241
p04011
u428397309
1566190481
Python
Python (3.4.3)
py
Accepted
17
2940
168
# -*- coding: utf-8 -*- 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 print(ans)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,595
s333147042
p04011
u264265458
1566183663
Python
Python (3.4.3)
py
Accepted
17
3060
110
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[0]*a[2])
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,596
s296536253
p04011
u732963817
1566179417
Python
Python (3.4.3)
py
Accepted
17
2940
115
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) print(K * X + (N - K) * Y if N > K else N * X)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,597
s307329975
p04011
u187857228
1566166505
Python
Python (3.4.3)
py
Accepted
17
2940
179
def test(): n = int(input()) k = int(input()) x = int(input()) y = int(input()) print(k*x + (n-k)*y if n > k else n*x) if __name__ == "__main__": test()
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,598
s809159166
p04011
u492447501
1566148933
Python
Python (3.4.3)
py
Accepted
17
2940
80
N, K, X, Y = [int(input()) for i in range(4)] print(X*min(N,K)+Y*max(N-K, 0))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,599
s665017610
p04011
u215018528
1566146552
Python
Python (3.4.3)
py
Accepted
17
2940
92
N, K, X, Y = [int(input()) for _ in range(4)] print(X * K + Y * (N - K) if N > K else X * N)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,600
s282236414
p04011
u275861030
1566113113
Python
Python (3.4.3)
py
Accepted
19
2940
205
N = int(input()) #5 K = int(input()) #3 X = int(input()) Y = int(input()) total = 0 for a in range(1, N+1): #6 , 1, 2, 3, 4, 5 if a <= K: total += X else: total += Y print(total)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,601
s084531432
p04011
u714378447
1566105214
Python
Python (3.4.3)
py
Accepted
18
2940
112
N=int(input()) K=int(input()) X=int(input()) Y=int(input()) if N>K: print(X*K+Y*(N-K)) else: print(X*N)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,602
s337769000
p04011
u745385679
1566101868
Python
Python (3.4.3)
py
Accepted
17
2940
101
n, k, x, y = [int(input()) for _ in range(4)] if n-k > 0: print(k*x+(n-k)*y) else: print(n*x)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,603
s438555881
p04011
u753803401
1566087369
Python
Python (3.4.3)
py
Accepted
19
2940
156
n = int(input()) k = int(input()) x = int(input()) y = int(input()) t = 0 for i in range(n): if i < k: t += x else: t += y print(t)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,604
s177388213
p04011
u243572357
1566081809
Python
Python (3.4.3)
py
Accepted
17
2940
107
a, b, c, d = [int(input()) for i in range(4)] if a <= b: print(a*c) else: print(b * c + (a - b) * d)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,605
s143165856
p04011
u360116509
1566077609
Python
Python (3.4.3)
py
Accepted
17
2940
132
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N > K: print(K * X + (N - K) * Y) else: print(N * X)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,606
s984275334
p04011
u524870111
1566072191
Python
Python (3.4.3)
py
Accepted
37
5076
376
import sys from fractions import gcd import bisect stdin = sys.stdin ns = lambda: stdin.readline().rstrip() ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)] n, k, x, y = [ni() for _ in range(4)] if n <= k: ...
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,607
s701274272
p04011
u524870111
1566071984
Python
Python (3.4.3)
py
Accepted
35
5076
374
import sys from fractions import gcd import bisect stdin = sys.stdin ns = lambda: stdin.readline().rstrip() ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)] n = ni() k = ni() x = ni() y = ni() if n <= k: ...
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,608
s314270681
p04011
u901582103
1566070541
Python
Python (3.4.3)
py
Accepted
18
2940
93
a=[int(input())for i in range(4)];print(a[0]*a[2]if a[0]<a[1]else a[2]*a[1]+a[3]*(a[0]-a[1]))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,609
s742958606
p04011
u183896397
1566060110
Python
Python (3.4.3)
py
Accepted
25
2940
172
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) ans = 0 for i in range(1,N+1): if i <= K: ans += X else: ans += Y print(ans)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,610
s029808706
p04011
u181195295
1566048531
Python
Python (3.4.3)
py
Accepted
17
2940
93
N,K,X,Y = [int(input()) for i in range(4)] if (N > K): print(K*X + (N-K)*Y) else: print(N*X)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,611
s888339352
p04011
u643714578
1566047851
Python
Python (3.4.3)
py
Accepted
17
2940
75
N,K,X,Y=[int(input()) for i in range(4)] print(X*K+Y*(N-K) if N>K else X*N)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,612
s281815458
p04011
u271044469
1566020704
Python
Python (3.4.3)
py
Accepted
17
2940
126
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)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,613
s496792963
p04011
u464912173
1566017533
Python
Python (3.4.3)
py
Accepted
17
2940
86
n, k, x, y = [int(input()) for i in range(4)] print(n*x if n <= k else k*x + (n-k)*y)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,614
s876962636
p04011
u792670114
1566007596
Python
Python (3.4.3)
py
Accepted
17
2940
122
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N <= K: r = X*N else: r = X*K+Y*(N-K) print(r)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,615
s921843252
p04011
u842689614
1566005397
Python
Python (3.4.3)
py
Accepted
17
2940
109
N=int(input()) K=int(input()) X=int(input()) Y=int(input()) if N<=K: print(X*N) else: print(X*K+Y*(N-K))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,616
s489123437
p04011
u477977638
1565928833
Python
Python (3.4.3)
py
Accepted
17
2940
65
n,k,x,y=(int(input()) for i in [0]*4) print(n*x-(x-y)*max(n-k,0))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,617
s024276720
p04011
u438662618
1565925656
Python
Python (3.4.3)
py
Accepted
17
2940
106
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) print(N*X if N <= K else K*X+(N-K)*Y)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,618
s407070768
p04011
u247922466
1565922311
Python
Python (3.4.3)
py
Accepted
17
3060
261
def A_TakandHotels(): N = int(input()) K = int(input()) X = int(input()) Y = int(input()) ans = 0 if K < N: ans = X * K + (N-K) * Y else: ans = X * N print(ans) if __name__ == "__main__": A_TakandHotels()
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,619
s690314229
p04011
u831873131
1565917705
Python
Python (3.4.3)
py
Accepted
21
2940
151
n = int(input()) k = int(input()) x = int(input()) y = int(input()) price = 0 for i in range(1, n + 1): price += x if i <= k else y print(price)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,620
s104380784
p04011
u693694535
1565917189
Python
Python (3.4.3)
py
Accepted
17
2940
117
N=int(input()) K=int(input()) X=int(input()) Y=int(input()) if N<=K: Q=N*X else: Q=K*X+(N-K)*Y print(int(Q))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,621
s081203920
p04011
u937642029
1565914902
Python
Python (3.4.3)
py
Accepted
18
3060
212
import sys import bisect input = sys.stdin.readline def main(): n=int(input()) k=int(input()) x=int(input()) y=int(input()) if(n<=k): k=n print(k*x+(n-k)*y) main()
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,622
s565231970
p04011
u106103668
1565894209
Python
Python (3.4.3)
py
Accepted
17
3060
197
def resolve(): n =int(input()) k =int(input()) x =int(input()) y =int(input()) temp = max(0,n-k) if temp==0: print(x*n) else: print(x*k+y*temp) resolve()
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,623
s403120273
p04011
u256464928
1565890207
Python
Python (3.4.3)
py
Accepted
17
2940
78
n,k,x,y = [int(input()) for _ in range(4)] print(k*x+(n-k)*y if n>=k else n*x)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,624
s572422431
p04011
u785470389
1565889800
Python
Python (3.4.3)
py
Accepted
17
2940
169
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n > k: price = k * x price = price + (n - k) * y elif n <= k: price = n * x print(price)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,625
s610394312
p04011
u475503988
1565888057
Python
Python (3.4.3)
py
Accepted
17
2940
118
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) ans = min(N, K) * X + max(N-K, 0) * Y print(ans)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,626
s374616045
p04011
u453500284
1565886817
Python
Python (3.4.3)
py
Accepted
18
2940
68
n,k,x,y=[int(input()) for i in range(4)] print(n*x-(x-y)*max(n-k,0))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,627
s940694944
p04011
u604231488
1565879874
Python
Python (3.4.3)
py
Accepted
17
2940
78
n, k, x, y = (int(input()) for i in [0] * 4) print(min(n, k)*x+max(n-k, 0)*y)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,628
s495566160
p04011
u649558044
1565849441
Python
Python (3.4.3)
py
Accepted
20
2940
98
n, k, x, y = map(int, [input(), input(), input(), input()]) print(x * min(n, k) + y * max(0, n-k))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,629
s530677241
p04011
u821251381
1565839937
Python
Python (3.4.3)
py
Accepted
17
2940
79
N,K,X,Y= map(int,open(0).read().split()) print(N*X if K > N else K*X + (N-K)*Y)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,630
s795591849
p04011
u830054172
1565836045
Python
Python (3.4.3)
py
Accepted
17
2940
120
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n>k: print(k*x+(n-k)*y) else: print(n*x)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,631
s819960070
p04011
u002459665
1565834785
Python
Python (3.4.3)
py
Accepted
20
3060
142
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n > k: ans = k * x + (n - k) * y else: ans = n * x print(ans)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,632
s618697381
p04011
u994988729
1565823839
Python
Python (3.4.3)
py
Accepted
17
2940
113
n=int(input()) k=int(input()) x=int(input()) y=int(input()) if n<=k: print(x*n) else: print(x*k+y*(n-k))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,633
s615929409
p04011
u367713721
1565804129
Python
Python (3.4.3)
py
Accepted
18
2940
181
# -*- coding:utf-8 -*- N = int(input()) K = int(input()) X = int(input()) Y = int(input()) fee = 0 if N <= K: fee = X * N elif N > K: fee = X * K + Y * (N-K) print(fee)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,634
s815497684
p04011
u598229387
1565802337
Python
Python (3.4.3)
py
Accepted
17
2940
126
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n > k: print(k*x + (n-k) * y) else: print(n*x)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,635
s831378929
p04011
u143903328
1565797420
Python
Python (3.4.3)
py
Accepted
17
2940
133
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)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,636
s360890263
p04011
u959759457
1565793958
Python
Python (3.4.3)
py
Accepted
17
2940
76
N,K,X,Y=[int(input()) for i in range(4)] print(X*N if N<=K else X*K+Y*(N-K))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,637
s544951979
p04011
u480568292
1565773403
Python
Python (3.4.3)
py
Accepted
17
2940
68
n,k,x,y = (int(input()) for i in [0]*4) print(n*x-(x-y)*max(n-k,0))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,638
s957228394
p04011
u407016024
1565769854
Python
Python (3.4.3)
py
Accepted
17
2940
108
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) print(K*X + (N-K)*Y if N >= K else X*N )
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,639
s576727022
p04011
u044632922
1565754865
Python
Python (3.4.3)
py
Accepted
17
2940
76
n,k,x,y=(int(input()) for i in range(4)) print(x*n if n<=k else x*k+y*(n-k))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,640
s903581444
p04011
u532099150
1565751767
Python
Python (3.4.3)
py
Accepted
17
2940
127
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if (n-k)>0: print((k*x)+((n-k)*y)) else: print(n*x)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,641
s401024029
p04011
u465246274
1565744496
Python
Python (3.4.3)
py
Accepted
17
2940
101
n, k, x, y = [int(input()) for i in range(4)] if n-k >= 1: print(x*k + y*(n-k)) else: print(x*n)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,642
s223244425
p04011
u729535891
1565732645
Python
Python (3.4.3)
py
Accepted
17
2940
173
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N >= K : ans = X * K + Y * (N - K) print(int(ans)) else: ans = X * N print(int(ans))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,643
s257664983
p04011
u544637026
1565726220
Python
Python (3.4.3)
py
Accepted
17
3060
116
n= int(input()) k = int(input()) x = int(input()) y = int(input()) f = min(k,n) f *=x s = max(0,n-k) s*=y print(f+s)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,644
s398316218
p04011
u111365362
1565724364
Python
Python (3.4.3)
py
Accepted
18
3064
137
#15:24 n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n >= k: print( k * x + (n-k) * y ) else: print( n * x )
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,645
s410822907
p04011
u970197315
1565720021
Python
Python (3.4.3)
py
Accepted
17
2940
108
n = int(input()) k = int(input()) x = int(input()) y = int(input()) print(n*x if k > n else k*x + (n - k)*y)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,646
s255897475
p04011
u280552586
1565716644
Python
Python (3.4.3)
py
Accepted
17
2940
68
a,b,c,d=[int(input()) for i in range(4)] print(a*c-(c-d)*max(a-b,0))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,647
s397369801
p04011
u280552586
1565715431
Python
Python (3.4.3)
py
Accepted
17
2940
65
n,k,x,y=(int(input()) for i in [0]*4) print(n*x-(x-y)*max(n-k,0))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,648
s719202794
p04011
u457554982
1565709653
Python
Python (3.4.3)
py
Accepted
17
2940
113
n=int(input()) k=int(input()) x=int(input()) y=int(input()) if n>k: kane=k*x+(n-k)*y else: kane=n*x print(kane)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,649
s079210273
p04011
u578850957
1565706827
Python
Python (3.4.3)
py
Accepted
17
2940
120
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)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,650
s673990329
p04011
u488127128
1565667659
Python
Python (3.4.3)
py
Accepted
17
2940
88
import sys N,K,X,Y = map(int, sys.stdin.readlines()) print(K*X+(N-K)*Y if N>K else N*X)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,651
s152560402
p04011
u847165882
1565666494
Python
Python (3.4.3)
py
Accepted
17
2940
92
list=[input() for i in range(4)] N,K,X,Y=map(int,list) print(X*K+Y*(N-K) if N > K else X*N)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,652
s101506707
p04011
u872030436
1565663080
Python
Python (3.4.3)
py
Accepted
19
2940
110
N, K, X, Y = [int(input()) for _ in range(4)] if N > K: print( K * X + (N-K) * Y) else: print( N * X)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,653
s488581680
p04011
u433532588
1565661706
Python
Python (3.4.3)
py
Accepted
17
2940
126
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)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,654
s560178513
p04011
u977661421
1565660601
Python
Python (3.4.3)
py
Accepted
17
2940
187
# -*- coding: utf-8 -*-S N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if K + 1 <= N: Z = (X * K) + (Y * (N - K)) print(Z) else: Z = X * N print(Z)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,655
s714521245
p04011
u842388336
1565659974
Python
Python (3.4.3)
py
Accepted
17
2940
99
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) print(min(N,K)*X+max(0,N-K)*Y)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,656
s190534031
p04011
u391328897
1565659414
Python
Python (3.4.3)
py
Accepted
17
2940
127
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n > k: print(k*x + (n - k)*y) else: print(n*x)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,657
s002199216
p04011
u405660020
1565657850
Python
Python (3.4.3)
py
Accepted
17
2940
113
n=int(input()) k=int(input()) x=int(input()) y=int(input()) if k<n: print(x*k+y*(n-k)) else: print(x*n)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,658
s432644022
p04011
u790710233
1565653922
Python
Python (3.4.3)
py
Accepted
17
2940
84
n, k, x, y = [int(input()) for _ in range(4)] print(k*x+(n-k)*y if n >= k else n*x)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,659
s358363636
p04011
u802963389
1565650556
Python
Python (3.4.3)
py
Accepted
20
2940
87
N, K, X, Y = [int(input()) for _ in range(4)] print(min(N, K) * X + max(0, N - K) * Y)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,660
s872796690
p04011
u798316285
1565648458
Python
Python (3.4.3)
py
Accepted
17
2940
89
a,b,c,d=[int(input()) for i in range(4)] if a<=b: print(a*c) else: print(b*c+(a-b)*d)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,661
s714965185
p04011
u574117646
1565648100
Python
Python (3.4.3)
py
Accepted
17
2940
122
n=int(input()) k=int(input()) x=int(input()) y=int(input()) if n>=k: ans = k*x+(n-k)*y else: ans = n*x print(ans)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,662
s831488099
p04011
u936985471
1565646533
Python
Python (3.4.3)
py
Accepted
17
2940
90
n=int(input()) k=int(input()) x=int(input()) y=int(input()) print((k*x+(n-k)*y,n*x)[k>=n])
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,663
s239507524
p04011
u597017430
1565621316
Python
Python (3.4.3)
py
Accepted
17
2940
141
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N >= K: print( N * X + (N-K) * (Y - X) ) else: print( N * X )
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,664
s581610648
p04011
u600402037
1565611154
Python
Python (3.4.3)
py
Accepted
17
2940
70
n,k,x,y=[int(input()) for i in range(4)] z=min(n,k) print(z*x+(n-z)*y)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,665
s601374243
p04011
u057308539
1565571633
Python
Python (3.4.3)
py
Accepted
17
2940
141
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N > K: S = K*X+(N-K)*Y print(S) else: S = N*X print(S)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,666
s714909002
p04011
u160659351
1565569738
Python
Python (3.4.3)
py
Accepted
17
2940
130
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N - K < 0: print(N*X) else: print((N - K)*Y + K*X)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,667
s867410409
p04011
u559103167
1565567981
Python
Python (3.4.3)
py
Accepted
17
2940
75
n, k, x, y = [int(input()) for i in range(4)] print(n*x - (x-y)*max(n-k,0))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,668
s929153184
p04011
u248670337
1565566131
Python
Python (3.4.3)
py
Accepted
18
2940
65
n,k,x,y=(int(input()) for i in [0]*4) print(n*x-(x-y)*max(n-k,0))
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,669
s250863123
p04011
u360515075
1565563172
Python
Python (3.4.3)
py
Accepted
18
2940
93
N, K, X, Y = (int(input()) for i in range(4)) print (K * X + (N - K) * Y if N > K else N * X)
p04011
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>There is a hotel with the following accommodation fee:</p> <ul> <li><var>X</var> yen (the currency of Japan) per night, for the first <var>K</var> nights</li> <li><var>Y</var> yen per night, for the <va...
5 3 10000 9000
48000
1,196,670