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
s901522160
p04011
u276192130
1503783712
Python
Python (3.4.3)
py
Accepted
17
2940
134
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,197,471
s562008676
p04011
u650245944
1503613841
Python
Python (3.4.3)
py
Accepted
17
2940
78
n, k, x, y = [int(input()) for _ in range(4)] 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,197,472
s636459097
p04011
u650245944
1503612877
Python
Python (3.4.3)
py
Accepted
17
2940
87
a = [int(input()) for i in range(4)] print(a[2]*min(a[0],a[1])+max(0,(a[0]-a[1])*a[3]))
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,197,473
s222677802
p04011
u355254193
1501742598
Python
Python (2.7.6)
py
Accepted
10
2568
139
n = int(raw_input()) k = int(raw_input()) x = int(raw_input()) y = int(raw_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,197,474
s498722193
p04011
u482969053
1501728810
Python
Python (3.4.3)
py
Accepted
19
3060
163
n = int(input()) k = int(input()) x = int(input()) y = int(input()) ans = 0 for i in range(n): if i < k: ans += x else: ans += y print(ans)
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,197,475
s094579695
p04011
u596276291
1501689504
Python
Python (3.4.3)
py
Accepted
21
3316
244
from collections import defaultdict def main(): N, K, X, Y = int(input()), int(input()), int(input()), int(input()) ans = 0 for i in range(N): ans += X if i < K else Y print(ans) if __name__ == '__main__': 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,197,476
s096162134
p04011
u364386647
1501252835
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,197,477
s657666631
p04011
u839537730
1501177537
Python
Python (3.4.3)
py
Accepted
17
2940
124
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,197,478
s035775429
p04011
u255555420
1500578834
Python
Python (3.4.3)
py
Accepted
17
3060
141
N=int(input()) K=int(input()) X=int(input()) Y=int(input()) A=0 if N<=K: A=N*X print(A) else: A=(K*X)+(N-K)*Y print(A)
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,197,479
s738383364
p04011
u214380782
1500426492
Python
Python (3.4.3)
py
Accepted
17
2940
137
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n < k: print(x*n) else: ans = x*k + y*(n-k) 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,197,480
s663933613
p04011
u218984487
1500323847
Python
Python (3.4.3)
py
Accepted
17
2940
181
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N <= K: ans = N * X print(ans) else: a = K * X b = (N - K) * Y ans = a + b 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,197,481
s103164082
p04011
u914001098
1499809734
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(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,197,482
s440185912
p04011
u594329566
1498566378
Python
Python (3.4.3)
py
Accepted
17
3060
338
def ini(): return int(input()) def inli(): return list(map(int, input().split())) def inf(): return float(input()) def inlf(): return list(map(float, input().split())) def inl(): return list(input()) def pli(): return "".join(list(map(str, ans))) n= ini() k= ini() x = ini() y = ini() if k<n: print(k*x+(n-k)*y) els...
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,197,483
s881206592
p04011
u120026978
1498115239
Python
Python (3.4.3)
py
Accepted
18
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,197,484
s010712724
p04011
u502149531
1497856088
Python
Python (3.4.3)
py
Accepted
17
2940
128
a = int(input()) b = int(input()) c = int(input()) d = int(input()) if a <= b : print(c*a) 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,197,485
s122054137
p04011
u237267413
1497841884
Python
Python (3.4.3)
py
Accepted
18
2940
169
N = int( input() ) K = int( input() ) X = int( input() ) Y = int( input() ) if N <= K: sumoffee = N*X elif K < N: sumoffee = K*X + ( N - K )*Y print( sumoffee )
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,197,486
s462887148
p04011
u996252264
1497733542
Python
Python (3.4.3)
py
Accepted
17
3060
252
def ri(): return int(input()) def rli(): return list(map(int, input().split())) def ris(): return list(input()) def pli(): return "".join(list(map(str, ans))) N = ri() K = ri() X = ri() Y = ri() if(K >= N): 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,197,487
s410180627
p04011
u761320129
1497194853
Python
Python (2.7.6)
py
Accepted
10
2568
75
N = input() K = input() X = input() Y = input() print N*Y + min(N,K)*(X-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,197,488
s597794356
p04011
u340294296
1496698113
Python
Python (3.4.3)
py
Accepted
18
2940
133
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,197,489
s858924999
p04011
u879309973
1495626797
Python
Python (2.7.6)
py
Accepted
10
2568
118
N = int(raw_input()) K = int(raw_input()) X = int(raw_input()) Y = int(raw_input()) print (min(K, N)*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,197,490
s786369440
p04011
u667084803
1494992409
Python
Python (3.4.3)
py
Accepted
17
2940
108
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,197,491
s799073062
p04011
u125205981
1494560298
Python
Python (3.4.3)
py
Accepted
17
2940
202
def main(): 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) 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,197,492
s694302104
p04011
u646336933
1493776228
Python
Python (3.4.3)
py
Accepted
17
2940
110
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,197,493
s220381899
p04011
u192442087
1493413041
Python
Python (3.4.3)
py
Accepted
17
2940
139
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,197,494
s052857230
p04011
u058240079
1493304886
Python
Python (2.7.6)
py
Accepted
10
2568
110
n,k,x,y = [int(raw_input()) for _ in range(4)] 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,197,495
s705864670
p04011
u057586044
1492706679
Python
Python (3.4.3)
py
Accepted
17
2940
114
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N<=K : print(X*N) else : print(Y*(N-K)+X*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,197,496
s792484423
p04011
u149051097
1491932933
Python
Python (2.7.6)
py
Accepted
10
2568
167
#!/usr/bin/env python # coding:utf-8 import os, sys import math N = input() K = input() X=input() Y=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,197,497
s436528331
p04011
u419874471
1491932115
Python
Python (3.4.3)
py
Accepted
17
2940
280
#!/usr/bin/env python #coding:utf-8 def input_strs(): return input().split(" ") def input_nums(): return [int(i) for i in input_strs()] n = int(input()) k = int(input()) x = int(input()) y = int(input()) 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,197,498
s469920388
p04011
u087279476
1491188944
Python
Python (3.4.3)
py
Accepted
17
3060
152
n = int(input()) k = int(input()) x = int(input()) y = int(input()) ans = 0 if n > k: ans += k*x ans += (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,197,499
s630404839
p04011
u976966750
1490129620
Python
PyPy2 (5.6.0)
py
Accepted
34
27628
142
n = int(raw_input()) k = int(raw_input()) x = int(raw_input()) y = int(raw_input()) if k<n: print x * k + (n - k) * y 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,197,500
s629035130
p04011
u559722042
1490073809
Python
Python (3.4.3)
py
Accepted
19
2940
150
a = [int(input()) for i in range(4)] sum = 0 for i in range(a[0]): if i + 1 <= a[1]: sum += a[2] else: sum += a[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,197,501
s339913098
p04011
u912359563
1489751114
Python
Python (3.4.3)
py
Accepted
17
2940
116
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) 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,197,502
s291865505
p04011
u332385682
1488398536
Python
Python (3.4.3)
py
Accepted
17
3064
383
import sys def debug(x, table): for name, val in table.items(): if x is val: print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr) return None def solve(): N = int(input()) K = int(input()) x = int(input()) y = int(input()) ans = x * min(N, K) + y * max(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,197,503
s576959611
p04011
u622011073
1487379988
Python
Python (3.4.3)
py
Accepted
17
2940
78
n,k,x,y=[int(input())for _ in [0]*4] if n<k:print(n*x) else:print(y*(n-k)+x*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,197,504
s106442515
p04011
u423925725
1486826860
Python
Python (3.4.3)
py
Accepted
24
3064
232
# coding: utf-8; def main(): 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) if __name__ == '__main__': 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,197,505
s951922341
p04011
u045939752
1486152066
Python
Python (3.4.3)
py
Accepted
22
3064
90
N=int(input()) K=int(input()) X=int(input()) Y=int(input()) 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,197,506
s835110275
p04011
u012693733
1484631825
Python
Python (2.7.6)
py
Accepted
16
2568
144
n = int(raw_input()) k = int(raw_input()) x = int(raw_input()) y = int(raw_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,197,507
s673109989
p04011
u815524843
1483557620
Python
Python (2.7.6)
py
Accepted
17
2568
104
N = input() K = input() X = input() Y = 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,197,508
s474977949
p04011
u637175065
1482706885
Python
Python (3.4.3)
py
Accepted
52
5672
321
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time sys.setrecursionlimit(10**7) inf = 10**20 mod = 10**9 + 7 def main(): n = int(input()) k = int(input()) x = int(input()) y = int(input()) r = x * min(n,k) r += y * max(0,n-k) return r print(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,197,509
s407040551
p04011
u386131832
1482604263
Python
Python (3.4.3)
py
Accepted
23
3064
112
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,197,510
s450730532
p04011
u580920947
1482423199
Python
Python (3.4.3)
py
Accepted
24
3064
197
# -*- coding: utf-8 -*- # problem A N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if K < N: out = K * X + (N - K) * Y print(out) else: out = N * X print(out)
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,197,511
s728397038
p04011
u317493066
1482117753
Python
Python (3.4.3)
py
Accepted
22
3064
159
# -*- coding:utf-8 -*- N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N < K : print(str(X*N)) else: print(str(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,197,512
s532384811
p04011
u942697937
1482041503
Python
Python (2.7.6)
py
Accepted
16
2568
148
N = int(raw_input()) K = int(raw_input()) X = int(raw_input()) Y = int(raw_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,197,513
s586752338
p04011
u681132540
1481421719
Python
Python (3.4.3)
py
Accepted
23
3064
133
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,197,514
s509668362
p04011
u481333386
1481083900
Python
Python (3.4.3)
py
Accepted
24
3064
219
# -*- coding: utf-8 -*- n = int(input()) k = int(input()) x = int(input()) y = int(input()) def main(): if n <= k: sum = (n * x) else: sum = (k * x) + ((n - k) * y) return sum print(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,197,515
s666550929
p04011
u333917945
1480831029
Python
Python (3.4.3)
py
Accepted
23
3064
132
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if k < n: 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,197,516
s339462419
p04011
u596276291
1480653019
Python
Python (3.4.3)
py
Accepted
24
3064
260
def main(): n = int(input()) k = int(input()) x = int(input()) y = int(input()) ans = 0 for i in range(n): if i < k: ans += x else: ans += y print(ans) if __name__ == '__main__': 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,197,517
s203953400
p04011
u309289733
1480485735
Python
Python (3.4.3)
py
Accepted
24
3068
148
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n <= k: price = x * n else: price = x * k + y * (n - k) 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,197,518
s793976193
p04011
u402953845
1480104404
Python
Python (2.7.6)
py
Accepted
17
2568
195
import sys N = int(sys.stdin.readline()) K = int(sys.stdin.readline()) X = int(sys.stdin.readline()) Y = int(sys.stdin.readline()) print (K if K < N else N) * X + ((N - K) if K < N else 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,197,519
s740556639
p04011
u107077660
1479858680
Python
Python (3.4.3)
py
Accepted
24
3064
129
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N <= K: print(X*N) else: ans = X*K + Y*(N-K) 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,197,520
s258009050
p04011
u982020214
1479344092
Python
Python (3.4.3)
py
Accepted
23
3064
181
# 宿泊数 N = int(input()) # 通常料金期間 K = int(input()) # 通常料金X X = int(input()) # 割引料金Y 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,197,521
s886573130
p04011
u010110540
1479236841
Python
Python (3.4.3)
py
Accepted
23
3064
104
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) print(min(N,K)*X + (N - min(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,197,522
s608214413
p04011
u043805613
1478917568
Python
Python (2.7.6)
py
Accepted
18
2948
154
N=int(input()) K=int(input()) X=int(input()) Y=int(input()) sum=0 for i in range(N): if((i+1)<=K): sum+=X else: sum+=Y 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,197,523
s236635688
p04011
u493916575
1478778937
Python
Python (3.4.3)
py
Accepted
24
3064
125
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) ans = X * min(K, N) ans += Y * max(0, N - K) 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,197,524
s064069494
p04011
u831695469
1478718906
Python
Python (3.4.3)
py
Accepted
24
3064
225
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n-k < 0: ans = x*n 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,197,525
s050355978
p04011
u664481257
1478642339
Python
Python (3.4.3)
py
Accepted
22
3064
705
# -*- coding: utf-8 -*- # !/usr/bin/env python # vim: set fileencoding=utf-8 : """ # # Author: Noname # URL: https://github.com/pettan0818 # License: MIT License # Created: 火 11/ 8 16:49:06 2016 # Usage # """ def read_input(): N = int(input()) K = int(input()) X = int(input()) Y = int(input())...
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,197,526
s633132248
p04011
u089636269
1478583340
Python
Python (3.4.3)
py
Accepted
23
3064
129
# coding: UTF8 n = 4 N, K, X, Y = [int(input()) for i in range(n)] if N < K: s = N * X else: s = K * X + (N - K) * Y 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,197,527
s967263516
p04011
u272496669
1478453841
Python
Python (3.4.3)
py
Accepted
23
3064
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,197,528
s323528010
p04011
u354630369
1477793504
Python
Python (2.7.6)
py
Accepted
15
2568
147
N = int(raw_input()) K = int(raw_input()) X = int(raw_input()) Y = int(raw_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,197,529
s506174122
p04011
u117095520
1477597984
Python
Python (2.7.6)
py
Accepted
17
2568
96
N, K, X, Y = [int(raw_input()) for _ in xrange(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,197,530
s924708607
p04011
u234154017
1477271706
Python
Python (3.4.3)
py
Accepted
22
3064
130
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if K > N: 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,197,531
s596402503
p04011
u039623862
1477201191
Python
Python (3.4.3)
py
Accepted
23
3064
109
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,197,532
s121968532
p04011
u810799221
1477197531
Python
Python (3.4.3)
py
Accepted
23
3064
163
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N >= K: money = X * K money += Y * (N-K) print(money) else: money = X * N print(money)
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,197,533
s493673502
p04011
u448407332
1477020866
Python
Python (2.7.6)
py
Accepted
17
2568
124
n = input() k = input() x = input() y = input() if k < n: cost = x * k + y * (n - k) else: cost = x * n 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,197,534
s945726208
p04011
u471797506
1476590459
Python
Python (2.7.6)
py
Accepted
27
4004
228
# -*- coding: utf-8 -*- import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll N = int(raw_input()) K = int(raw_input()) X = int(raw_input()) Y = int(raw_input()) print X*min(K, N) + 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,197,535
s708204345
p04011
u596276291
1476229874
Python
Python (3.4.3)
py
Accepted
24
3064
269
def main(): 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) if __name__ == '__main__': 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,197,536
s642195871
p04011
u065683101
1475459840
Python
Python (3.4.3)
py
Accepted
23
3064
207
def read(): return int(input()) def reads(sep=None): return list(map(int, input().split(sep))) def main(): n, k, x, y = [read() for _ in range(4)] print(min(k, n)*x + max(0,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,197,537
s161337561
p04011
u133038626
1475362146
Python
Python (3.4.3)
py
Accepted
23
3064
128
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,197,538
s649017407
p04011
u518732500
1474858867
Python
Python (3.4.3)
py
Accepted
24
3064
180
def main(): n = int(input()) k = int(input()) x = int(input()) y = int(input()) print(min(n, k) * x + max(n - k, 0) * y) if __name__ == '__main__': 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,197,539
s995639153
p04011
u059940903
1474827065
Python
Python (2.7.6)
py
Accepted
16
2568
85
N = input() K = input() X = input() Y = 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,197,540
s998597517
p04011
u575473686
1474743895
Python
Python (3.4.3)
py
Accepted
23
3064
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,197,541
s708736490
p04011
u696805736
1473999315
Python
Python (3.4.3)
py
Accepted
37
3064
125
n=int(input()) k=int(input()) x=int(input()) y=int(input()) ans=0 if n<=k: ans=x*n else: ans=x*k+y*(n-k) 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,197,542
s200997553
p04011
u480847874
1473951460
Python
Python (3.4.3)
py
Accepted
39
3064
164
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) sum = 0 for n in range(N): if n < K: sum +=X else: sum +=Y 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,197,543
s576958478
p04011
u608854150
1473699784
Python
Python (3.4.3)
py
Accepted
39
3064
118
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N < K+1: 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,197,544
s520949331
p04011
u522204654
1473627770
Python
Python (2.7.6)
py
Accepted
28
2568
128
N = int(raw_input()) K = int(raw_input()) X = int(raw_input()) Y = int(raw_input()) print (N-K) * Y + K * X if K < N 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,197,545
s726758776
p04011
u971321372
1473584538
Python
PyPy2 (5.6.0)
py
Accepted
64
8816
97
n = input() k = input() x = input() y = 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,197,546
s691967660
p04011
u820351940
1473544960
Python
Python (3.4.3)
py
Accepted
41
3064
97
N, K, X, Y = [int(input()) for x in range(4)] print(K * X + (N - K) * Y if N - K > 0 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,197,547
s783452438
p04011
u343675824
1473489314
Python
Python (3.4.3)
py
Accepted
39
3064
107
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) print( min([K,N])*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,197,548
s741317794
p04011
u870040448
1473454249
Python
Python (2.7.6)
py
Accepted
28
2568
110
n = input() k = input() x = input() y = input() if n > k : print str(x*k + y*(n-k)) else : print str(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,197,549
s723860181
p04011
u494611468
1473431164
Python
Python (3.4.3)
py
Accepted
37
3064
159
put = [] for i in range(4): put.append(int(input())) if put[0] < put[1]: print(put[2] * put[0]) else: print(put[2] * put[1] + put[3] * (put[0] - put[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,197,550
s772969985
p04011
u105412073
1473286341
Python
Python (3.4.3)
py
Accepted
42
3188
182
# coding: utf-8 # Here your code ! N = int(input()) K = int(input()) X = int(input()) Y = int(input()) T = 0 for i in range(N) : if i + 1 > K :T += Y else :T += X 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,197,551
s544630908
p04011
u839224193
1473280646
Python
Python (3.4.3)
py
Accepted
42
3188
142
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) r = 0 if N < K: r = N * X else: r = K * X + (N - K) * Y 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,197,552
s209097431
p04011
u095015466
1473274244
Python
Python (2.7.6)
py
Accepted
26
2568
143
N = int(raw_input()) K = int(raw_input()) X = int(raw_input()) Y = int(raw_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,197,553
s402499395
p04011
u664031692
1473185181
Python
Python (2.7.6)
py
Accepted
27
2568
112
n = input() k = input() x = input() y = input() if n > k : ret = k*x+(n-k)*y else: ret = n*x print ret
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,197,554
s682656809
p04011
u544337787
1473182567
Python
Python (2.7.6)
py
Accepted
28
2568
146
n = int(raw_input()) k = int(raw_input()) x = int(raw_input()) y = int(raw_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,197,555
s371747743
p04011
u425448230
1473179426
Python
Python (3.4.3)
py
Accepted
41
3064
102
N, K, X, Y = [int(input()) for i in range(4)] if N <= K: 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,197,556
s218194518
p04011
u023220201
1473172533
Python
Python (2.7.6)
py
Accepted
27
2948
182
def a(n, k, x, y): en = 0 for i in range(n): if i < k: en += x else: en+= y return en n = input() k = input() x = input() y = input() print a(n, k, x, 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,197,557
s174884636
p04011
u514826602
1473170880
Python
Python (3.4.3)
py
Accepted
38
3064
117
n = int(input()) k = int(input()) x = int(input()) y = int(input()) 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,197,558
s738224971
p04011
u482544950
1473121277
Python
Python (3.4.3)
py
Accepted
37
3064
124
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n <= k: print(x*n) else: print(x*k+(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,197,559
s915796929
p04011
u914627967
1473106541
Python
Python (3.4.3)
py
Accepted
41
3064
129
N,K,X,Y =int(input()),int(input()),int(input()),int(input()) ans=0 for s in range(N): if s>=K: ans+=Y else: ans+=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,197,560
s793854636
p04011
u284188208
1473102808
Python
Python (2.7.6)
py
Accepted
29
2948
120
a = input() b = input() c = input() d = input() e = 0 for i in range(a): if i <= b-1: e += c else: e += d print e
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,197,561
s753561842
p04011
u679071005
1473098117
Python
Python (2.7.6)
py
Accepted
27
2568
125
n = input() k = input() x = input() y = input() result = 0 if n <= k: result = n*x else: result = k*x+(n-k)*y print result
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,197,562
s751722975
p04011
u871239364
1473088877
Python
Python (3.4.3)
py
Accepted
47
3064
145
n = int(input()) k = int(input()) x = int(input()) y = int(input()) if n <= k : print(x*n) else : ans = k*x+(n-k)*y 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,197,563
s277183160
p04011
u212829728
1473049791
Python
Python (3.4.3)
py
Accepted
43
3064
235
n = 4 input_list = [] for i in range(4): input_list.append(int(input())) N = input_list[0] K = input_list[1] X = input_list[2] Y = input_list[3] if N > K : result = K * X + (N-K) * Y else: result = N * X print ( result )
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,197,564
s216774762
p04011
u875021335
1473022022
Python
Python (3.4.3)
py
Accepted
38
3064
159
# -*- encoding: utf-8 -*- 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,197,565
s256827685
p04011
u283229916
1472931751
Python
Python (2.7.6)
py
Accepted
27
2568
94
n=input() k=input() x=input() y=input() if n>k: n-=k else: k=n n=0 print(k*x+n*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,197,566
s093195951
p04011
u862517767
1472904113
Python
Python (3.4.3)
py
Accepted
41
3064
71
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,197,567
s529779884
p04011
u542939897
1472883339
Python
Python (2.7.6)
py
Accepted
25
2568
118
N=int(raw_input()) K=int(raw_input()) X=int(raw_input()) Y=int(raw_input()) 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,197,568
s297457590
p04011
u945094648
1472880027
Python
Python (2.7.6)
py
Accepted
29
2568
111
n = input() k = input() x = input() y = input() if n > k: print k * x + (n-k) * y elif n <= k: 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,197,569
s089160932
p04011
u713368238
1472841088
Python
Python (3.4.3)
py
Accepted
39
3064
168
n = int(input()) k = int(input()) x = int(input()) y = int(input()) cost = 0 for i in range(n): if i < k: cost += x else: cost += y 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,197,570