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
s372786085
p00376
u934460477
1580006045
Python
Python3
py
Accepted
20
5588
74
x,y=map(int,input().split()) if x<=y: print(y-x) else: print(x-y)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,334
s477094286
p00376
u726971073
1579976616
Python
Python3
py
Accepted
20
5580
49
a, b = map(int, input().split()) print(abs(a-b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,335
s308789239
p00376
u829695570
1575726099
Python
Python3
py
Accepted
20
5580
46
a,b=map(int, input().split()) print(abs(a-b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,336
s083162471
p00376
u798961710
1574693201
Python
Python3
py
Accepted
20
5588
88
x1, x2 = map(int, input().split()) y = x1-x2 if y <=0: print(-y) else: print(y)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,337
s257289415
p00376
u153447291
1573736627
Python
Python3
py
Accepted
20
5580
47
a,b = map(int,input().split()) print(abs(a-b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,338
s280140370
p00376
u350155409
1573305554
Python
Python3
py
Accepted
30
5596
91
m,n = [ int(s) for s in input().split() ] if m > n: print(m-n) else: print(n-m)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,339
s371643361
p00376
u447421429
1571884728
Python
Python3
py
Accepted
20
5580
45
x,y=map(int,input().split()) print(abs(x-y))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,340
s664597938
p00376
u803862921
1571482572
Python
Python3
py
Accepted
20
5596
61
x1, x2 = [int(x) for x in input().split()] print(abs(x1-x2))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,341
s123265063
p00376
u183700122
1568121125
Python
Python3
py
Accepted
30
5584
59
x = list(map(int, input().split())) print(abs(x[0]-x[1]))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,342
s951046958
p00376
u669519139
1566033851
Python
Python3
py
Accepted
20
5580
54
x1,x2 =map(int,input().split()) print (abs(x1 - x2))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,343
s282893800
p00376
u784856415
1565091161
Python
Python3
py
Accepted
20
5580
45
a,b=map(int,input().split()) print(abs(a-b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,344
s591847013
p00376
u108130680
1564930002
Python
Python3
py
Accepted
20
5580
45
a,b=map(int,input().split()) print(abs(a-b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,345
s977392110
p00376
u433250944
1564929509
Python
Python3
py
Accepted
20
5592
97
x,y=map(int,input().split()) if x==y: print(0) elif x>y: print(x-y) else: print(y-x)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,346
s231804613
p00376
u939401108
1564924604
Python
Python3
py
Accepted
20
5580
51
a, b = map(int, input().split()) print(abs(b - a))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,347
s302668463
p00376
u800408401
1564848137
Python
Python3
py
Accepted
20
5584
76
a,b = map(int,input().split(" ")) if a > b: print(a-b) else: print(b-a)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,348
s527624849
p00376
u312033355
1564726151
Python
Python3
py
Accepted
20
5588
74
a,b=map(int,input().split()) if a>=b: print(a-b) else: print(b-a)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,349
s011267559
p00376
u003684951
1563166572
Python
Python3
py
Accepted
20
5580
51
a, b = map(int, input().split()) print(abs(a - b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,350
s667679154
p00376
u051789695
1562376261
Python
Python3
py
Accepted
20
5580
45
a,b=map(int,input().split()) print(abs(a-b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,351
s536869198
p00376
u495152850
1562061568
Python
Python3
py
Accepted
20
5580
55
x1, x2 = map(int, input().split()) print(abs(x1 - x2))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,352
s696229498
p00376
u260980560
1561879676
Python
Python3
py
Accepted
20
5580
53
x1, x2 = map(int, input().split()) print(abs(x2-x1))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,353
s371732463
p00376
u272180444
1561372323
Python
Python3
py
Accepted
20
5596
118
def main(): x = list(map(int,input().split())) print(abs(x[0]-x[1])) if __name__ == '__main__': main()
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,354
s868206168
p00376
u043254318
1558546558
Python
Python3
py
Accepted
20
5596
90
a,b = [int(i) for i in input().split()] if a > b: print(a - b) else: print(b - a)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,355
s211803625
p00376
u610816226
1557467294
Python
Python3
py
Accepted
20
5580
49
a, b = map(int, input().split()) print(abs(a-b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,356
s309927966
p00376
u226572569
1557135441
Python
Python3
py
Accepted
20
5580
55
x1, x2 = map(int, input().split()) print(abs(x1 - x2))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,357
s784589845
p00376
u006424459
1555325252
Python
Python3
py
Accepted
20
5588
82
x1,x2=map(int,input().split()) if x1<=x2: print(x2-x1) else: print(x1-x2)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,358
s732921905
p00376
u313117499
1551797899
Python
Python3
py
Accepted
20
5584
54
x, y = input().split(' ') print(abs(int(x) - int(y)))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,359
s555125822
p00376
u604920879
1550725747
Python
Python3
py
Accepted
20
5580
55
x1, x2 = map(int, input().split()) print(abs(x1 - x2))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,360
s203930878
p00376
u539753516
1547991275
Python
Python3
py
Accepted
20
5580
45
a,b=map(int,input().split()) print(abs(a-b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,361
s200903524
p00376
u435226340
1546849010
Python
Python3
py
Accepted
20
5580
52
x1,x2 = map(int, input().split()) print(abs(x1-x2))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,362
s754093663
p00376
u847761085
1543898092
Python
Python3
py
Accepted
20
5600
124
# coding:utf-8 x = list(map(int, input().split(" "))) if x[0] >= x[1]: print(x[0] - x[1]) else: print(x[1] - x[0])
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,363
s892220517
p00376
u352394527
1543729111
Python
Python3
py
Accepted
30
5580
51
a, b = map(int, input().split()) print(abs(a - b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,364
s012720314
p00376
u717526540
1542872825
Python
Python3
py
Accepted
20
5580
53
x1, x2 = map(int, input().split()) print(abs(x1-x2))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,365
s402117453
p00376
u689047545
1542238383
Python
Python3
py
Accepted
20
5584
80
x, y = map(int, input().split()) if x >= y: print(x-y) else: print(y-x)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,366
s910335062
p00376
u991869837
1542118763
Python
Python3
py
Accepted
20
5588
96
x1, x2 = map(int, input().split()) if x1 > x2: a = x1 - x2 else: a = x2 - x1 print(a)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,367
s382740504
p00376
u745360181
1542094014
Python
Python3
py
Accepted
20
5592
104
x1,x2 = map(int,input().split()) if(x1 >= x2): print(x1 - x2) elif(x1 < x2): print(x2 - x1)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,368
s208613119
p00376
u011621222
1539748858
Python
Python3
py
Accepted
20
5584
58
a,b = map(int, input().split()) ans = abs(a-b) print(ans)
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,369
s189478701
p00376
u231562319
1539365069
Python
Python3
py
Accepted
20
5580
48
a,b = map(int,input().split()) print(abs(a-b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,370
s312263561
p00376
u525366883
1538018317
Python
Python3
py
Accepted
20
5580
49
a, b = map(int, input().split()) print(abs(a-b))
p00376
<h1>Red Dragonfly</h1>   <p> It’s still hot every day, but September has already come. It’s autumn according to the calendar. Looking around, I see two red dragonflies at rest on the wall in front of me. It’s autumn indeed. </p> <p> When two red dragonflies’ positional information as measured from the end of the w...
20 30
10
19,371
s410157215
p00377
u552594238
1545489276
Python
Python3
py
Accepted
20
5592
315
friends=input() friends=friends.split() friends_all=friends[0] friends_cakes=friends[1] person=int(friends_all)+1 cakes=input() cakes_amount=0 for a in cakes.split(): cakes_amount+=int(a) one_person=cakes_amount//person if cakes_amount%person!=0: one_person+=1 else: pass print(one_person)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,372
s324741179
p00377
u552594238
1545489825
Python
Python3
py
Accepted
20
5592
290
friends=input() friends=friends.split() friends_all=friends[0] person=int(friends_all)+1 cakes=input() cakes_amount=0 for a in cakes.split(): cakes_amount+=int(a) one_person=cakes_amount//person if cakes_amount%person!=0: one_person+=1 else: pass print(one_person)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,373
s213736318
p00377
u435226340
1546173033
Python
Python3
py
Accepted
20
5596
150
n,c = map(int, input().split()) p = list(map(int, input().split())) v = 0 for i in p: v += i ans = v//(n+1) if v % (n+1) > 0: ans += 1 print(ans)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,374
s355916168
p00377
u126478680
1546511557
Python
Python3
py
Accepted
30
5664
190
# coding: utf-8 import math N, C = list(map(int, input().split(' '))) cakes = list(map(int, input().split(' '))) num_cakes = sum(cakes) mycake = math.ceil(num_cakes/(N+1)) print(mycake)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,375
s754684193
p00377
u990228206
1551413776
Python
Python3
py
Accepted
20
5596
157
n,c=list(map(int,input().split())) pli=list(map(int,input().split())) for i in range(c): p=sum(pli) mycake=p//(n+1) if p%(n+1)>0:mycake+=1 print(mycake)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,376
s007029123
p00377
u888548672
1555986102
Python
Python3
py
Accepted
20
5592
96
n, p = map(int, input().split()) c = sum(map(int, input().split())) print(1 + int((c-1)/(n+1)))
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,377
s916063693
p00377
u286298310
1597852762
Python
Python3
py
Accepted
20
5596
157
n,c = map(int,input().split()) p = list(map(int,input().split())) s = sum(p) q = s % (n + 1) if q == 0: print(s//(n+1)) else: print(s//(n+1)+1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,378
s132974803
p00377
u729823147
1596702222
Python
Python3
py
Accepted
20
5596
176
n,c=map(int,input().split()) s=list(map(int,input().split())) n=n+1 cake=0 for i in range(c): cake+=s[i] a=cake%n if a==0: print(cake//n) else: print((cake//n)+1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,379
s194004626
p00377
u548184870
1594201061
Python
Python3
py
Accepted
30
5592
132
N, C = map(int, input().split()) P = sum(list(map(int, input().split()))) if P%(N+1)==0: print(P//(N+1)) else: print(P//(N+1)+1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,380
s770111580
p00377
u056829778
1589783612
Python
Python3
py
Accepted
20
5596
136
n,c = list(map(int, input().split())) p = list(map(int, input().split())) cake = sum(p) human = n+1 ans = -(-cake // human) print(ans)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,381
s615370512
p00377
u842461513
1588849947
Python
Python3
py
Accepted
20
5596
220
#標準入力 a,b = map(int,input().split()) num = list(map(int,input().split())) #リストの値を全て合計する num = sum(num) #出力 if num % (a + 1) == 0:print(num // (a + 1)) else:print(num // (a + 1) + 1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,382
s392946761
p00377
u946454151
1588077591
Python
Python3
py
Accepted
20
5592
88
n,c=map(int,input().split()) n+=1 s=sum(map(int,input().split())) print(s//n+bool(s%n))
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,383
s434230355
p00377
u829695570
1575726460
Python
Python3
py
Accepted
20
5588
83
n,c=map(int,input().split()) s=sum(map(int,input().split())) print((s-1)//(n+1)+1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,384
s741651505
p00377
u153447291
1573736794
Python
Python3
py
Accepted
20
5660
109
import math N,C = map(int,input().split()) p = list(map(int,input().split())) print(math.ceil(sum(p)/(N+1)))
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,385
s772884960
p00377
u183700122
1568121321
Python
Python3
py
Accepted
20
5656
121
import math N, C = map(int, input().split()) p_sum = sum(list(map(int, input().split()))) print(math.ceil(p_sum/(N+1)))
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,386
s046813645
p00377
u669519139
1566033695
Python
Python3
py
Accepted
20
5596
139
N,C = map(int,input().split()) P = list(map(int,input().split())) m = N+1 s = sum(P) ans = s//m if s % m != 0: ans += 1 print(ans)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,387
s508712236
p00377
u784856415
1565143347
Python
Python3
py
Accepted
20
5604
139
n,c=map(int,input().split()) p=[int(i) for i in input().split()] cake=sum(p) ans=divmod(cake,n+1) print(ans[0] if ans[1]==0 else ans[0]+1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,388
s698165123
p00377
u726971073
1563894910
Python
Python3
py
Accepted
20
5592
96
n, k = map(int, input().split()) sm = sum(list(map(int, input().split()))) print((n+sm)//(n+1))
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,389
s306880542
p00377
u037441960
1562814262
Python
Python3
py
Accepted
20
5596
172
N, C = map(int, input().split()) X = list(map(int, input().split())) cake = sum(X) if(cake % (N + 1) == 0) : print(cake // (N + 1)) else : print((cake // (N + 1)) + 1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,390
s448429580
p00377
u051789695
1562376631
Python
Python3
py
Accepted
20
5596
128
n,c=map(int,input().split()) p=list(map(int,input().split())) cake=sum(p) a=divmod(cake,n+1) print(a[0] if a[1]==0 else a[0]+1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,391
s190075418
p00377
u260980560
1561879821
Python
Python3
py
Accepted
20
5588
90
N, C = map(int, input().split()) *P, = map(int, input().split()) print((sum(P)+N)//(N+1))
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,392
s425698572
p00377
u043254318
1559830253
Python
Python3
py
Accepted
20
5604
217
N,C = [int(i) for i in input().split()] p = [int(i) for i in input().split()] t = 0 for i in range(len(p)): t += p[i] if t % (N+1) == 0: ans = t // (N+1) else: ans = t // (N+1) + 1 print(ans)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,393
s522578420
p00377
u610816226
1557467581
Python
Python3
py
Accepted
20
5596
159
N, C = map(int, input().split()) all_cake = list(map(int, input().split())) ans = sum(all_cake)//(N+1) if sum(all_cake) % (N+1) != 0: ans += 1 print(ans)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,394
s566522939
p00377
u226572569
1557135662
Python
Python3
py
Accepted
20
5596
124
N, C = map(int, input().split()) p = list(map(int, input().split())) s = sum(p) print(s // (N + 1) + int(s % (N + 1) != 0))
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,395
s009959926
p00377
u006424459
1555326287
Python
Python3
py
Accepted
20
5596
185
N,C=map(int,input().split()) li=list(map(int,input().split())) party_menber=N+1 amari=sum(li)%party_menber hitori=sum(li)//party_menber if amari>=1: hitori=hitori+1 print(hitori)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,396
s054421079
p00377
u805699996
1552033170
Python
Python3
py
Accepted
20
5592
171
n,c = map(int, input().split()) pi = list(map(int, input().split())) n += 1 total_p = 0 for p in pi: total_p += p p = int(total_p/n) if total_p%n != 0 : p += 1 print(p)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,397
s423663042
p00377
u313117499
1551798711
Python
Python3
py
Accepted
20
5592
146
friend =input().split() cake= sum(map(int, input().split())) m = int(friend[0]) + 1 ans = cake // m if cake % m != 0: ans += 1 print(ans)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,398
s021222324
p00377
u604920879
1550726323
Python
Python3
py
Accepted
20
5596
138
n, c = map(int, input().split()) p = list(map(int, input().split())) s = 0 for i in range(c): s = s + p[i] print((s - 1) // (n + 1) + 1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,399
s915505232
p00377
u847761085
1543901704
Python
Python3
py
Accepted
20
5600
168
n,c = map(int, input().split(" ")) p = sum(list(map(int, input().split(" ")))) n += 1 result = int(p / n) if p % n == 0: print(result) else: print(result + 1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,400
s232377460
p00377
u352394527
1543729382
Python
Python3
py
Accepted
20
5592
117
n, c = map(int, input().split()) cake = sum(map(int, input().split())) print(cake // (n + 1) + bool(cake % (n + 1)))
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,401
s599700404
p00377
u717526540
1542873066
Python
Python3
py
Accepted
20
5596
172
n, c = map(int, input().split()) plist = list(map(int, input().split())) ans = sum(plist) // (n + 1) if sum(plist) % (n + 1) == 0: print(ans) else: print(ans + 1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,402
s516417734
p00377
u689047545
1542238739
Python
Python3
py
Accepted
20
5596
142
n, c = map(int, input().split()) p = sum(list(map(int, input().split()))) x = p // (n+1) if p % (n+1) == 0: print(x) else: print(x+1)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,403
s987893793
p00377
u623996423
1541488967
Python
Python3
py
Accepted
20
5596
84
N, _ = map(int, input().split()) print(-(-sum(map(int, input().split())) // (N+1)))
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,404
s214331915
p00377
u231562319
1539365470
Python
Python3
py
Accepted
20
5596
137
n,c = map(int,input().split()) p = list(map(int,input().split())) m = n+1 s = sum(p) ans = s//m if s%m != 0: ans += 1 print(ans)
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,405
s540837724
p00377
u525366883
1538018800
Python
Python3
py
Accepted
20
5660
112
import math N, C = map(int, input().split()) P = sum(list(map(int, input().split()))) print(math.ceil(P/(N+1)))
p00377
<h1>Cake Party</h1> <p>  I’m planning to have a party on my birthday. Many of my friends will come to the party. Some of them will come with one or more pieces of cakes, but it is not certain if the number of the cakes is a multiple of the number of people coming. </p> <p> I wish to enjoy the cakes equally among...
5 4 5 5 6 5
4
19,406
s959621868
p00378
u990228206
1551415401
Python
Python3
py
Accepted
20
5596
211
a,b,n=list(map(int,input().split())) if n%500!=0:n=n+500-n%500 if a>=b*2: print((n//500)*b) elif a<b: if n%1000!=0:n=n+1000-n%1000 print((n//1000)*a) else: print(((n//1000)*a)+((n%1000)//500)*b)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,407
s194546895
p00378
u888548672
1555987500
Python
Python3
py
Accepted
20
5596
188
a, b, x = map(int, input().split()) c = 0 while x > 0: if x > 500: c += a if a < 2*b else 2*b x-=1000 else: c += b if b < a else a x-=500 print(c)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,408
s222353095
p00378
u729823147
1596705842
Python
Python3
py
Accepted
20
5596
512
a,b,x=map(int,input().split()) pay=0 if a//2<b: if x==1000: pay=a elif x==500: if b>a: pay=a else: pay=b else: aa=x//1000 aaa=x%1000 if aaa>500: pay=(aa+1)*a elif aaa==0: pay=aa*a else: ...
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,409
s318265555
p00378
u548184870
1594269513
Python
Python3
py
Accepted
20
5656
216
import math A, B, X = map(int, input().split()) if A<B: print(A*(-(-X//1000))) elif A<2*B: C = A*(X//1000) if X%1000==0: pass elif X%1000<=500: C += B else: C += A print(C) else: print(B*(-(-X//500)))
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,410
s390775470
p00378
u842461513
1591423876
Python
Python3
py
Accepted
20
5596
439
#標準入力 a,b,c = map(int,input().split()) #必要量を500で割った商を出力する i = c // 500 #商が500で割り切れないなら個数を1足す if c % 500 != 0:i += 1 #aよりb*2のほうが小さいなら1Lを買わないで500mlで個数を買った計算にしaの方が大きいなら両方を買う計算をする if a >= b * 2:print(b * i) elif a < b and c <= 1000:print(a) else:print((i // 2) * a + (i % 2) * b)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,411
s780818730
p00378
u056829778
1589784114
Python
Python3
py
Accepted
20
5596
139
a,b,x = list(map(int, input().split())) t = a * (x // 1000) + b * -(-(x % 1000) // 500) print(min(a * -(-x // 1000), b * -(-x // 500), t))
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,412
s201756367
p00378
u829695570
1575796632
Python
Python3
py
Accepted
20
5600
176
a,b,x = map(int, input().split()) if a >= b*2: print(((x-1)//500+1)*b) elif x%1000 > 500: print(((x-1)//1000+1)*a) else: print(min(((x-1)//1000+1)*a, x//1000*a+b))
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,413
s780996001
p00378
u492405338
1574680125
Python
Python3
py
Accepted
20
5604
416
a, b, x = [int(i) for i in input().split()] if x % 1000: max_a = x // 1000 + 1 else: max_a = x // 1000 if x % 500: max_b = x // 500 + 1 else: max_b = x // 500 min_cost = max_a*a + max_b*b for i in range(max_a + 1): for j in range(max_b + 1): if 1000*i + 500*j >= x: if a*i + b...
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,414
s815014118
p00378
u183700122
1568121744
Python
Python3
py
Accepted
20
5668
213
import math A, B, X = map(int, input().split()) ans = float('inf') for a in range(math.ceil(X/1000)+1): if X-1000*a < 0: b = 0 else: b = math.ceil((X-1000*a)/500) ans = min(ans, A*a+B*b) print(ans)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,415
s114309081
p00378
u726971073
1563895746
Python
Python3
py
Accepted
20
5596
190
a, b, x = map(int, input().split()) d, mo = divmod(x, 1000) if mo>500: print(min(d*a+2*b, (d+1)*a, (d*2+2)*b)) elif mo!=0: print(min(d*a+b, (d+1)*a, (d*2+1)*b)) else: print(min(d*a, d*2*b))
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,416
s139402346
p00378
u051789695
1562377095
Python
Python3
py
Accepted
20
5596
157
a,b,x=map(int,input().split()) ans=10**9 for i in range(21): for j in range(41): if i*1000+j*500>=x: ans=min(ans,i*a+j*b) print(ans)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,417
s113170695
p00378
u260980560
1561880261
Python
Python3
py
Accepted
20
5596
175
A, B, X = map(int, input().split()) k = (X // 1000) ans = k * min(A, 2*B) r = X - 1000*k if 0 < r <= 500: ans += min(A, B) elif 500 < r: ans += min(A, 2*B) print(ans)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,418
s191799890
p00378
u043254318
1560695477
Python
Python3
py
Accepted
20
5672
204
import math A,B,X = [int(i) for i in input().split()] ans1 = math.ceil(X/1000) * A ans2 = math.ceil(X/500) * B ans3 = math.floor(X/1000) * A + math.ceil((X % 1000)/500) * B print(min(ans1,ans2,ans3))
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,419
s071225629
p00378
u610816226
1557468834
Python
Python3
py
Accepted
30
5664
308
import math a, b, x = map(int,input().split()) ans = 0 if a < b: ans = math.ceil(x/1000)* a print(ans) elif a >= b*2: print(math.ceil(x/500)*b) else: ans = (x // 1000)*a if (x % 1000) > 500: ans += a elif x % 1000 == 0: pass else: ans += b print(ans)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,420
s491513574
p00378
u226572569
1557138719
Python
Python3
py
Accepted
20
5600
233
A, B, X = map(int, input().split()) if A > 2 * B: A = 2 * B if A < B: B = A ans = X // 1000 * A X %= 1000 # print(ans + (B if X <= 500 else A)) a, b, x = A, B, X wa = ans + (0 if X == 0 else (B if X <= 500 else A)) print(wa)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,421
s508227518
p00378
u313117499
1551868648
Python
Python3
py
Accepted
20
5592
165
x, y, z = map(int, input().split()) lit = z // 500 if z % 500 != 0: lit += 1 ans = min(y * lit, x * (lit // 2 + 1), x *(lit // 2) + y * (lit % 2)) print(ans)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,422
s392376575
p00378
u604920879
1550742798
Python
Python3
py
Accepted
20
5596
190
a, b, x = map(int, input().split()) if a > b * 2: m = (x + 499) // 500 * b elif a < b or ((x - 1) % 1000) >= 500: m = (x + 999) // 1000 * a else: m = x // 1000 * a + b print(m)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,423
s278941065
p00378
u435226340
1546850688
Python
Python3
py
Accepted
20
5596
237
A,B,X = map(int, input().split()) ans = a = b = 0 if X % 500 != 0: X += 500 - X%500 if A < B: a = X//1000 + (1 if (X%1000>0) else 0) elif A > 2*B: b = X//500 else: a = X//1000; X %= 1000 b = X//500 print(A*a + B*b)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,424
s569299871
p00378
u352394527
1543730103
Python
Python3
py
Accepted
20
5600
208
a, b, x = map(int, input().split()) if b * 2 <= a: ans = b * (x // 500 + bool(x % 500)) else: ans = a * (x // 1000) + min(b * ((x % 1000) // 500 + bool((x % 1000) % 500)), a * bool(x % 1000)) print(ans)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,425
s364792536
p00378
u689047545
1543282013
Python
Python3
py
Accepted
20
5604
366
a, b, x = map(int, input().split()) if a // 2 < b: if x % 1000 == 0: print(a*(x//1000)) else: if (x % 1000) / 500 > 1: print(min(a*(x//1000 + 1), a*(x//1000) + b*2)) else: print(min(a*(x//1000 + 1), a*(x//1000) + b)) else: if x % 500 == 0: print(b*(x//...
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,426
s280005463
p00378
u717526540
1542873721
Python
Python3
py
Accepted
20
5596
379
a, b, x = map(int, input().split()) if a // 2 < b: num_a = x // 1000 if x % 1000 == 0: print(a * num_a) elif a < b: print(a * (num_a + 1)) elif x % 1000 > 500: print(a * (num_a + 1)) else: print(a * num_a + b) else: num_b = x // 500 if x % 500 == 0: ...
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,427
s729636761
p00378
u623996423
1541489721
Python
Python3
py
Accepted
20
5596
115
A, B, X = map(int, input().split()) A = min(A, B * 2) B = min(A, B) n = -(-X // 500) print(n // 2 * A + n % 2 * B)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,428
s283846514
p00378
u231562319
1539373446
Python
Python3
py
Accepted
30
5596
171
a,b,x = map(int,input().split()) ans = 10**10 for i in range(22): for j in range(44): if i*1000 + j*500 >= x: ans = min(ans, a*i+b*j) print(ans)
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,429
s110971576
p00378
u525366883
1538028202
Python
Python3
py
Accepted
20
5660
145
import math A, B, X = map(int, input().split()) C = X // 1000 D = X % 1000 print(min(A*C, B*C*2) + min(math.ceil(D/1000)*A, math.ceil(D/500)*B))
p00378
<h1>Heat Stroke</h1> <p>  We have had record hot temperatures this summer. To avoid heat stroke, you decided to buy a quantity of drinking water at the nearby supermarket. Two types of bottled water, 1 and 0.5 liter, are on sale at respective prices there. You have a definite quantity in your mind, but are willing to ...
180 100 2400
460
19,430
s255259732
p00381
u352394527
1547207368
Python
Python3
py
Accepted
90
6288
231
from collections import defaultdict MOD = 1000000007 n = int(input()) s = input() t = input() dic = defaultdict(int) dic[s[0]] = 1 for cs, ct in zip(s[1:n-1], t[1:n-1]): dic[cs] += dic[ct] dic[cs] %= MOD print(dic[t[-1]])
p00381
<h1>Transporter</h1> <p> In the year 30XX, an expedition team reached a planet and found a warp machine suggesting the existence of a mysterious supercivilization. When you go through one of its entrance gates, you can instantaneously move to the exit irrespective of how far away it is. You can move even to the end ...
6 abbaba baabab
5
19,442
s038621164
p00387
u231562319
1546120054
Python
Python3
py
Accepted
20
5580
50
a,b = map(int,input().split()) print((b+a-1)//a)
p00387
<h1>Party Dress</h1> <p> Yae joins a journey plan, in which parties will be held several times during the itinerary. She wants to participate in all of them and will carry several dresses with her. But the number of dresses she can carry with her may be smaller than that of the party opportunities. In that case, she ha...
3 5
2
19,443
s715801637
p00387
u435226340
1546173701
Python
Python3
py
Accepted
20
5580
52
A, B = map(int, input().split()) print((B+A-1)//A)
p00387
<h1>Party Dress</h1> <p> Yae joins a journey plan, in which parties will be held several times during the itinerary. She wants to participate in all of them and will carry several dresses with her. But the number of dresses she can carry with her may be smaller than that of the party opportunities. In that case, she ha...
3 5
2
19,444