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
s321197971
p01314
u836923362
1595604541
Python
Python3
py
Accepted
60
5660
351
#00:12 import math def sum_of_num(target,num): return (((2*target)/num)-num+1)/2 while True: target_num = int(input()) if target_num ==0: break count = 0 for i in range(2,int(target_num)): n = sum_of_num(target_num,i) if n.is_integer() and n >0: count = co...
p01314
<h1><font color="#000">Problem A:</font> Sum of Consecutive Integers</h1> <!-- <h3><U>連続する整数の和</U></h3> --> <p>あなたは数か月に渡る受験戦争を勝ち抜き,晴れてICPC大学に入学することができた.入学手続きの日,大学のキャンパス内では熱狂的なサークルの勧誘活動が行われており,あなたは大量のパンフレットを受け取って帰ってきた.部屋に戻ってきたあなたは受け取ったパンフレットの中から気になる一枚を見つけた.そのパンフレットは大学の広報部から渡されたものだった.</p> <p>パンフレットには以下のような問題が記されていた...
9 500 0
2 3
26,045
s628426673
p01314
u747915832
1590843923
Python
Python3
py
Accepted
100
5612
485
while True: N = int(input()) if N==0: break Nlist = list(range(1,N)) count = 0 while True: for i in range(1,1001,1): if i>=N/2: break sum = 0 j = i while True: sum += j j += 1 ...
p01314
<h1><font color="#000">Problem A:</font> Sum of Consecutive Integers</h1> <!-- <h3><U>連続する整数の和</U></h3> --> <p>あなたは数か月に渡る受験戦争を勝ち抜き,晴れてICPC大学に入学することができた.入学手続きの日,大学のキャンパス内では熱狂的なサークルの勧誘活動が行われており,あなたは大量のパンフレットを受け取って帰ってきた.部屋に戻ってきたあなたは受け取ったパンフレットの中から気になる一枚を見つけた.そのパンフレットは大学の広報部から渡されたものだった.</p> <p>パンフレットには以下のような問題が記されていた...
9 500 0
2 3
26,046
s729413159
p01314
u206124123
1587736647
Python
Python3
py
Accepted
20
5708
702
import math def get_one_int()->int: one_int = int(input()) return one_int def make_divisors(num:int)->set: divisors = set() for i in range(1, math.floor(num ** 0.5) + 1): if num % i == 0: divisors.add(i) divisors.add(num // i) return divisors def count_odd_num(num...
p01314
<h1><font color="#000">Problem A:</font> Sum of Consecutive Integers</h1> <!-- <h3><U>連続する整数の和</U></h3> --> <p>あなたは数か月に渡る受験戦争を勝ち抜き,晴れてICPC大学に入学することができた.入学手続きの日,大学のキャンパス内では熱狂的なサークルの勧誘活動が行われており,あなたは大量のパンフレットを受け取って帰ってきた.部屋に戻ってきたあなたは受け取ったパンフレットの中から気になる一枚を見つけた.そのパンフレットは大学の広報部から渡されたものだった.</p> <p>パンフレットには以下のような問題が記されていた...
9 500 0
2 3
26,047
s117081537
p01314
u464321546
1573030119
Python
Python3
py
Accepted
70
8288
3,669
#!/usr/bin/env python3 from collections import defaultdict,deque from heapq import heappush, heappop from bisect import bisect_left, bisect_right import sys, random, itertools, math sys.setrecursionlimit(10**5) input = sys.stdin.readline sqrt = math.sqrt def LI(): return list(map(int, input().split())) def LF(): return...
p01314
<h1><font color="#000">Problem A:</font> Sum of Consecutive Integers</h1> <!-- <h3><U>連続する整数の和</U></h3> --> <p>あなたは数か月に渡る受験戦争を勝ち抜き,晴れてICPC大学に入学することができた.入学手続きの日,大学のキャンパス内では熱狂的なサークルの勧誘活動が行われており,あなたは大量のパンフレットを受け取って帰ってきた.部屋に戻ってきたあなたは受け取ったパンフレットの中から気になる一枚を見つけた.そのパンフレットは大学の広報部から渡されたものだった.</p> <p>パンフレットには以下のような問題が記されていた...
9 500 0
2 3
26,048
s668110500
p01314
u123563150
1571307322
Python
Python3
py
Accepted
80
5600
212
while True: n=int(input()) ans=0 if n==0: break for i in range(2,n): ave=n/i if ave==int(ave): if ave-i//2>0 and i%2!=0: ans+=1 elif ave==int(ave)+0.5: if ave-i//2>0: ans+=1 print(ans)
p01314
<h1><font color="#000">Problem A:</font> Sum of Consecutive Integers</h1> <!-- <h3><U>連続する整数の和</U></h3> --> <p>あなたは数か月に渡る受験戦争を勝ち抜き,晴れてICPC大学に入学することができた.入学手続きの日,大学のキャンパス内では熱狂的なサークルの勧誘活動が行われており,あなたは大量のパンフレットを受け取って帰ってきた.部屋に戻ってきたあなたは受け取ったパンフレットの中から気になる一枚を見つけた.そのパンフレットは大学の広報部から渡されたものだった.</p> <p>パンフレットには以下のような問題が記されていた...
9 500 0
2 3
26,049
s404528076
p01314
u199911712
1571307132
Python
Python3
py
Accepted
60
5604
273
while (True): target = int(input()) if target == 0: break answer = 0 for i in range(target - 1): index = i + 2 if (target - (0.5 * index * (index - 1))) % index == 0 and (target - (0.5 * index * (index - 1))) > 0: answer += 1 print(answer)
p01314
<h1><font color="#000">Problem A:</font> Sum of Consecutive Integers</h1> <!-- <h3><U>連続する整数の和</U></h3> --> <p>あなたは数か月に渡る受験戦争を勝ち抜き,晴れてICPC大学に入学することができた.入学手続きの日,大学のキャンパス内では熱狂的なサークルの勧誘活動が行われており,あなたは大量のパンフレットを受け取って帰ってきた.部屋に戻ってきたあなたは受け取ったパンフレットの中から気になる一枚を見つけた.そのパンフレットは大学の広報部から渡されたものだった.</p> <p>パンフレットには以下のような問題が記されていた...
9 500 0
2 3
26,050
s226256029
p01314
u990228206
1554204272
Python
Python3
py
Accepted
30
5600
218
while 1: n=int(input()) if n==0:break nk=1 while nk*(nk+1)/2<n:nk+=1 ans=0 for i in range(2,nk+1): if i%2==1 and n%i==0 or i%2==0 and int(n/i-i/2+0.5)==n/i-i/2+1/2:ans+=1 print(ans)
p01314
<h1><font color="#000">Problem A:</font> Sum of Consecutive Integers</h1> <!-- <h3><U>連続する整数の和</U></h3> --> <p>あなたは数か月に渡る受験戦争を勝ち抜き,晴れてICPC大学に入学することができた.入学手続きの日,大学のキャンパス内では熱狂的なサークルの勧誘活動が行われており,あなたは大量のパンフレットを受け取って帰ってきた.部屋に戻ってきたあなたは受け取ったパンフレットの中から気になる一枚を見つけた.そのパンフレットは大学の広報部から渡されたものだった.</p> <p>パンフレットには以下のような問題が記されていた...
9 500 0
2 3
26,051
s881521330
p01314
u539753516
1534119830
Python
Python3
py
Accepted
30
5584
121
while 1: n=int(input()) if not n:break c=0 for i in range(3,n+1,2): if not n%i:c+=1 print(c)
p01314
<h1><font color="#000">Problem A:</font> Sum of Consecutive Integers</h1> <!-- <h3><U>連続する整数の和</U></h3> --> <p>あなたは数か月に渡る受験戦争を勝ち抜き,晴れてICPC大学に入学することができた.入学手続きの日,大学のキャンパス内では熱狂的なサークルの勧誘活動が行われており,あなたは大量のパンフレットを受け取って帰ってきた.部屋に戻ってきたあなたは受け取ったパンフレットの中から気になる一枚を見つけた.そのパンフレットは大学の広報部から渡されたものだった.</p> <p>パンフレットには以下のような問題が記されていた...
9 500 0
2 3
26,052
s602364536
p01314
u717727327
1421029956
Python
Python
py
Accepted
20
4232
257
d = [0 for _ in range(1000 + 1)] for i in range(1, 1000+1): j = i+1 s = i while s <= 1000: s += j j += 1 if s <= 1000: d[s] += 1 while True: N = int(raw_input()) if N==0: break print d[N]
p01314
<h1><font color="#000">Problem A:</font> Sum of Consecutive Integers</h1> <!-- <h3><U>連続する整数の和</U></h3> --> <p>あなたは数か月に渡る受験戦争を勝ち抜き,晴れてICPC大学に入学することができた.入学手続きの日,大学のキャンパス内では熱狂的なサークルの勧誘活動が行われており,あなたは大量のパンフレットを受け取って帰ってきた.部屋に戻ってきたあなたは受け取ったパンフレットの中から気になる一枚を見つけた.そのパンフレットは大学の広報部から渡されたものだった.</p> <p>パンフレットには以下のような問題が記されていた...
9 500 0
2 3
26,053
s930958619
p01315
u286751622
1556432944
Python
Python3
py
Accepted
60
6060
1,039
resultss = [] while True: N = int(input()) if N == 0: break B = [list(map(str, input().split())) for _ in range(N)] results = [] for i in range(N): A = [] name = B[i][0] B[i][0] = B[i][1] for j in range(10): A.append(int(B[i][j])) ...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,054
s191781450
p01315
u046108504
1559377681
Python
Python3
py
Accepted
50
5628
983
if __name__ == "__main__": while True: N = int(input()) if N == 0: break L = [] for i in range(N): l, p, a, b, c, d, e, f, s, m = input().split() L.append( [ l, int(p), int...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,055
s931874886
p01315
u731235119
1422204041
Python
Python
py
Accepted
30
4384
399
from operator import itemgetter while 1: N = int(raw_input()) if N == 0: break produce = [] for i in range(N): inputs = raw_input().split(" ") name = inputs[0] p,a,b,c,d,e,f,s,m = map(int,inputs[1:]) time = (a + b + c) + (d + e) * m value = f * s * m - p produce.append((-1.0 * value / time, name)) pr...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,056
s207466999
p01315
u617183767
1424149956
Python
Python
py
Accepted
40
4708
889
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import itertools import math from collections import Counter, defaultdict class Main(object): def __init__(self): pass def solve(self): ''' insert your code ''' while True: n = input()...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,057
s852155433
p01315
u120360464
1424474130
Python
Python
py
Accepted
30
4256
555
#! /usr/bin/python # -*- coding: utf-8 -*- #LPABCDEFSM #0123456789 while 1: N = int(raw_input()) if N==0: break crop = [raw_input().split() for i in range(N)] for i in range(N): crop[i][1:] = map(int, crop[i][1:]) ef = [] for i in range(N): com = (crop[i][-3]*crop[i][-1])*crop[i][-2]-c...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,058
s305640802
p01315
u316268279
1426008153
Python
Python3
py
Accepted
70
6728
459
#!/usr/bin/env python # -*- coding: utf-8 -*- while True: N = int(input()) if N == 0: break crops = {} for i in range(N): L,P,A,B,C,D,E,F,S,M = map(lambda x: int(x) if x.isnumeric() else x,input().split()) time = A+B+C for _ in range(M): time += D + E ...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,059
s909968318
p01315
u128811851
1434784341
Python
Python3
py
Accepted
60
6732
617
while True: amount = int(input()) if amount == 0: break efficiency_list = [] for _ in range(amount): crop = input().split() time = sum(map(int, crop[2:7])) M = int(crop[9]) if M > 1: for _ in range(1, M): time += int(crop[5]) + int(...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,060
s190218568
p01315
u408260374
1435409507
Python
Python3
py
Accepted
50
6728
505
while True: N = int(input()) if not N: break seeds = [] for i in range(N): plant = input().split() name, price = plant[0], int(plant[1]) seed_to_leaf, leaf_to_fruit = sum(map(int, plant[2:5])), sum(map(int, plant[5:7])) num_per, sold, mult = int(plant[7]), int(plant[8]), ...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,061
s659583405
p01315
u685815919
1474610317
Python
Python
py
Accepted
40
6332
516
while True: N = int(raw_input()) if N==0: break dic = {} for _ in xrange(N): L,P,A,B,C,D,E,F,S,M = raw_input().split() cost = int(P) time = int(A)+int(B)+int(C)+int(D)+int(E)+(int(D)+int(E))*(int(M)-1) profit = int(F) * int(S) * int(M) if float((profit-cost))/float(time) not in dic: di...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,062
s264729894
p01315
u506554532
1513950885
Python
Python3
py
Accepted
50
5616
342
while True: N = int(input()) if N == 0: break mem = [] for i in range(N): l,p,a,b,c,d,e,f,s,m = map(lambda x:int(x) if x[0].isdigit() else x, input().split()) time = a+b+c+(d+e)*m income = f*m*s - p mem.append((-income/time, l)) for e,name in sorted(mem): prin...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,063
s194404249
p01315
u509278866
1528171364
Python
Python3
py
Accepted
60
9148
1,030
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**10 mod = 998244353 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,064
s710995749
p01315
u011621222
1528867835
Python
Python3
py
Accepted
40
5624
411
while 1: n = int(input()) if n == 0: break ans = [] for i in range(n): l,p,a,b,c,d,e,f,s,m = input().split() p,a,b,c,d,e,f,s,m = map(int,[p,a,b,c,d,e,f,s,m]) sum = s*f*m-p sum /= (a+b+c+d+e+(m-1)*(d+e)) ans.append([l,sum]) ans.sort(key = lambda x: x[0]...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,065
s920960071
p01315
u109084363
1360833577
Python
Python
py
Accepted
30
4616
507
import sys import collections n = -1 while True: if n != -1: print '#' n = int(sys.stdin.readline()) if n == 0: break result = [] for i in xrange(n): read = raw_input().split() L = read[0] P, A, B, C, D, E, F, S, M = map(int, read[1:]) time = A +...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,066
s620510964
p01315
u104911888
1367984369
Python
Python
py
Accepted
20
4244
294
while True: n=input() if n==0:break R=[] for i in range(n): T=raw_input().split() L=T[0] P,A,B,C,D,E,F,S,M=map(int,T[1:]) t=A+B+C+(D+E)*M m=F*S*M-P R.append((-m/float(t),L)) for i in sorted(R): print i[1] print "#"
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,067
s117184639
p01315
u633068244
1399730730
Python
Python
py
Accepted
20
4256
297
while 1: n = input() if n == 0: break ans = [] for i in range(n): inp = raw_input().split() L = inp[0] P,A,B,C,D,E,F,S,M = map(int,inp[1:]) ans.append([L,(M*F*S-P)*1.0/(A+B+C+(D+E)*M)]) ans = sorted(sorted(ans), key = lambda x:x[1], reverse = True) for k,v in ans: print k print "#"
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,068
s253596775
p01315
u633068244
1399730808
Python
Python
py
Accepted
20
4248
289
while 1: n = input() if n == 0: break ans = [] for i in range(n): inp = raw_input().split() P,A,B,C,D,E,F,S,M = map(int,inp[1:]) ans.append([inp[0],(M*F*S-P)*1.0/(A+B+C+(D+E)*M)]) ans = sorted(sorted(ans), key = lambda x:x[1], reverse = True) for k,v in ans: print k print "#"
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,069
s308274181
p01315
u821608651
1575995047
Python
Python3
py
Accepted
40
5632
651
import sys sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def main(): while 1: ...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,070
s903101037
p01315
u853158149
1575885620
Python
Python3
py
Accepted
70
8192
1,029
#!usr/bin/env python3 from collections import defaultdict,deque from heapq import heappush, heappop import sys import math import bisect import random def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def LS():return [list(x) for x in sys.stdin.readline().split()]...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,071
s327694091
p01315
u464321546
1575883307
Python
Python3
py
Accepted
50
8372
1,421
#!/usr/bin/env python3 from collections import defaultdict,deque from heapq import heappush, heappop from bisect import bisect_left, bisect_right import sys, random, itertools, math sys.setrecursionlimit(10**5) input = sys.stdin.readline sqrt = math.sqrt def LI(): return list(map(int, input().split())) def LF(): return...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,072
s760823002
p01315
u123563150
1575543887
Python
Python3
py
Accepted
40
5616
388
while True: n=int(input()) if n==0: exit() else: aa=[] for i in range(n): l,p,a,b,c,d,e,f,s,m=input().split() p=int(p) a=int(a) b=int(b) c=int(c) d=int(d) e=int(e) f=int(f) s=int(s) m=int(m) time=a+b+c+(d+e)*m pro=s*m*f-p aa.append([pro/time,l]) aa.sort(key=lambda x:(-x...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,073
s533471694
p01315
u048191691
1575539238
Python
Python3
py
Accepted
50
5624
512
while True: N = int(input()) ans = [] if N == 0: break for i in range(N): L,P,A,B,C,D,E,F,S,M = input().split() P = int(P) A = int(A) B = int(B) C = int(C) D = int(D) E = int(E) F = int(F) S = int(S) M = int(M) ...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,074
s445548733
p01315
u073204138
1574399453
Python
Python3
py
Accepted
50
5624
454
while(True): n = int(input()) if n==0:break agri_list = {} for i in range(n): l,p,a,b,c,d,e,f,s,m = input().split() p = int(p) a = int(a) b = int(b) c = int(c) d = int(d) e = int(e) f = int(f) s = int(s) m = int(m) time = a + b + c + (d + e)* m income = s * m * f - p agri_list[i] = (l,inco...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,075
s317367194
p01315
u245823788
1562849890
Python
Python3
py
Accepted
40
5616
448
while True: N = int(input()) if N == 0: break data = [] for _ in range(N): inp = input().split() P, A, B, C, D, E, F, S, M = map(int, inp[1:]) time = A + B + C + M * (D + E) money = M * F * S - P da = [inp[0], money/time] data.append(da) ...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,076
s689205399
p01315
u931913851
1562845901
Python
Python3
py
Accepted
50
5616
618
while True: N = int(input()) if N == 0: break effies = {} for _ in range(N): L, P, A, B, C, D, E, F, S, M = map(str, input().split()) P = int(P) A = int(A) B = int(B) C = int(C) D = int(D) E = int(E) F = int(F) S = int(S) ...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,077
s152015085
p01315
u340991036
1562834972
Python
Python3
py
Accepted
40
5612
450
while True: N = int(input()) if N == 0: break data = [] for _ in range(N): inp = input().split() P, A, B, C, D, E, F, S, M = map(int, inp[1:]) time = A + B + C + M * (D + E) money = M * F * S - P da = [inp[0], money/time] data.append(da) ...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,078
s084481542
p01315
u846408447
1562822000
Python
Python3
py
Accepted
50
5620
618
while True: N = int(input()) if N == 0: break effies = {} for _ in range(N): L, P, A, B, C, D, E, F, S, M = map(str, input().split()) P = int(P) A = int(A) B = int(B) C = int(C) D = int(D) E = int(E) F = int(F) S = int(S) ...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,079
s694200289
p01315
u191474223
1562650686
Python
Python3
py
Accepted
80
7164
700
from collections import defaultdict,deque import sys,heapq,bisect,math,itertools,string,queue,copy,time sys.setrecursionlimit(10**8) INF = float('inf') mod = 10**9+7 eps = 10**-7 def inp(): return int(input()) def inpl(): return list(map(int, input().split())) def inpl_str(): return list(input().split()) while True: ...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,080
s938177349
p01315
u717526540
1545115782
Python
Python3
py
Accepted
50
5628
679
while 1: n = int(input()) if n == 0: break ans = [] for _ in range(n): data = list(input().split()) name = data.pop(0) data = [int(d) for d in data] p = data[0] a = data[1] b = data[2] c = data[3] d = data[4] e = data[5] ...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,081
s648703741
p01315
u352394527
1533369299
Python
Python3
py
Accepted
40
5612
339
while True: n = int(input()) if n == 0: break dic = [] for _ in range(n): lst = input().split() l = lst.pop(0) p, a, b, c, d, e, f, s, m = map(int, lst) time = a + b + c + (d + e) * m prof = f * s * m - p dic.append((-prof / time, l)) dic.sort() for _, name in dic: print(n...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,082
s637422405
p01315
u281836941
1531717078
Python
Python3
py
Accepted
40
5628
337
while 1: n=int(input()) if n==0: break D=[] for i in range(n): l,p,a,b,c,d,e,f,s,m=input().split() p,a,b,c,d,e,f,s,m=map(int,(p,a,b,c,d,e,f,s,m)) D.append(((s*f*m-p)/((d+e)*m+a+b+c),l)) D=sorted(D,key=lambda x:(-x[0],x[1])) for i in range(n): print(D[i][1]...
p01315
<h1><font color="#000">Problem B:</font> Moonlight Farm</h1> <!-- <h3><U>ムーンライト牧場</U></h3> --> <p>あなたは大人気webゲーム「ムーンライト牧場」に熱中している.このゲームの目的は,畑で作物を育て,それらを売却して収入を得て,その収入によって牧場を大きくしていくことである.</p> <p>あなたは速く畑を大きくしたいと考えた.そこで手始めにゲーム中で育てることのできる作物を,時間あたりの収入効率にもとづいて並べることにした.</p> <p>作物を育てるには種を買わなければならない.ここで作物 <i>i</i> の種の名前は ...
5 apple 1 1 1 1 1 1 1 10 1 banana 1 2 2 2 2 2 1 10 1 carrot 1 2 2 2 2 2 1 10 2 durian 1 3 3 3 3 3 1 10 1 eggplant 1 3 3 3 3 3 1 100 1 4 enoki 1 3 3 3 3 3 1 10 1 tomato 1 3 3 3 3 3 1 10 1 potato 1 3 3 3 3 3 1 10 1 onion 1 3 3 3 3 3 1 10 1 3 a 10 1 1 1 1 1 1 10 1 b 10 2 2 2 2 2 2 10 1 c 10 2 2 2 2 2 2 10 1 0
eggplant apple carrot banana durian # enoki onion potato tomato # b c a #
26,083
s672654503
p01321
u352394527
1546011326
Python
Python3
py
Accepted
40
5620
137
while True: n = int(input()) if n == 0:break lst = [sum(map(int, input().split())) for _ in range(n)] print(max(lst), min(lst))
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,084
s173774129
p01321
u260980560
1432570883
Python
Python
py
Accepted
20
4204
210
while 1: n = input() if not n: break mi = 1000; ma = 0 for i in xrange(n): s = sum(map(int, raw_input().split())) mi = min(mi, s) ma = max(ma, s) print ma, mi
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,085
s230678591
p01321
u078042885
1484209642
Python
Python3
py
Accepted
40
7680
171
while 1: n,a,b=int(input()),0,500 if n==0:break for _ in range(n): s=sum(map(int,input().split())) a=max(a,s) b=min(b,s) print(a,b)
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,086
s742952070
p01321
u779577827
1488720196
Python
Python3
py
Accepted
40
7596
172
while True: n = int(input()) if n == 0: break [print("{} {}".format(max(x), min(x))) for x in [[sum(map(int, input().split())) for i in range(n)]]]
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,087
s915472865
p01321
u546285759
1508361047
Python
Python3
py
Accepted
60
7736
285
d = {0: lambda x, y: max(x, y), 1: lambda x, y: min(x, y)} while True: n = int(input()) if n == 0: break ans = [0, 500] for _ in range(n): score = sum(map(int, input().split())) ans = [d[i](ans[i], score) for i in range(2)] print(*ans)
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,088
s775913427
p01321
u724548524
1526784254
Python
Python3
py
Accepted
30
5616
154
while True: n = int(input()) if n == 0:break p = [sum(map(int, input().split())) for _ in range(n)] print("{} {}".format(max(p), min(p)))
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,089
s413172807
p01321
u894941280
1348495263
Python
Python
py
Accepted
30
4232
214
while True: a = int(input()) ans,x=[0]*a,0 if a==0: break for i in range(a): hoge=map(int,raw_input().split()) for i in range(5): ans[x]+=hoge[i] else: x+=1 else: print max(ans),min(ans)
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,090
s383885840
p01321
u575065019
1362268871
Python
Python
py
Accepted
30
4224
330
ans=[] while True: scMax=0 scMin=500 n=input() if n==0: break for i in xrange(n): score=sum(map(int,raw_input().split())) if score > scMax: scMax=score if score < scMin: scMin=score ans.append(str(scMax)+' '+str(scMin)) for i in ans: ...
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,091
s719601464
p01321
u104911888
1368280203
Python
Python
py
Accepted
20
4224
194
while True: n=input() if n==0:break mi,ma=501,0 for i in range(n): s=sum(map(int,raw_input().split())) mi=min(s,mi) ma=max(s,ma) print "%d %d"%(ma,mi)
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,092
s647420754
p01321
u454358619
1378112091
Python
Python
py
Accepted
30
4224
270
import sys def solve(): while True: n = int(raw_input()) if n == 0: return s = [] for i in range(n): d = map(int,raw_input().split()) s.append(sum(d)) print max(s),min(s) if __name__ == "__main__": solve()
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,093
s525795823
p01321
u647766105
1389861703
Python
Python
py
Accepted
20
4204
161
while True: n = input() if n == 0: break L = [sum(map(int, raw_input().split())) for _ in xrange(n)] print "{} {}".format(max(L), min(L))
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,094
s458482203
p01321
u633068244
1398860409
Python
Python
py
Accepted
30
4208
121
while 1: n = input() if n == 0: break s = [sum(map(int,raw_input().split())) for i in range(n)] print max(s),min(s)
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,095
s585194347
p01321
u842461513
1589448942
Python
Python3
py
Accepted
50
5616
398
#0が来るまで回数の入力を繰り返す while True: j = int(input()) if j == 0:break #点数を合計し、一番小さいかずと、一番大きい数を出力する else: num_list = [] for _ in range(j): line = list(map(int,input().split())) num_list.append(sum(line)) print(str(max(num_list)) + " " + str(min(num_list)))
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,096
s328711039
p01321
u240091169
1589436014
Python
Python3
py
Accepted
50
5616
395
while True : n = int(input()) if n == 0 : break max_sum = 0 min_sum = 500 for i in range(n) : m_sum = 0 m = list(map(int, input().split())) for j in range(5) : m_sum += m[j] if max_sum < m_sum : max_sum = m_sum if min_sum ...
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,097
s231865853
p01321
u829695570
1577525654
Python
Python3
py
Accepted
40
5612
168
while 1: n = int(input()) if n == 0: break a = [] for _ in range(n): a.append(sum(map(int, input().split()))) print(max(a), min(a))
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,098
s412437054
p01321
u492405338
1575733607
Python
Python3
py
Accepted
50
5608
260
while 1: n = int(input()) if n == 0: break total = [] for i in range(n): score = input().split() sum = 0 for s in score: sum += int(s) total.append(sum) print(max(total), min(total))
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,099
s236786716
p01321
u153447291
1574935609
Python
Python3
py
Accepted
40
5620
205
while True: n = int(input()) if n == 0: break total = [] for _ in range(n): total.append(sum(list(map(int,input().split())))) total.sort() print(total[-1],total[0])
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,100
s046627226
p01321
u990228206
1552639850
Python
Python3
py
Accepted
40
5616
151
while 1: n=int(input()) if n==0:break s=[] for i in range(n): s.append(sum(map(int,input().split()))) print(max(s),min(s))
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,101
s837532587
p01321
u717526540
1545184564
Python
Python3
py
Accepted
40
5608
379
while 1: n = int(input()) if n == 0: break score = list(map(int, input().split())) top = sum(score) bottom = sum(score) for _ in range(n-1): score = list(map(int, input().split())) total = sum(score) if top < total: top = total elif bottom > ...
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,102
s301065885
p01321
u467175809
1534575024
Python
Python
py
Accepted
30
5036
369
#!/usr/bin/env python from collections import deque import itertools as it import sys import math sys.setrecursionlimit(10000000) while True: n = input() if n == 0: break Smax = 0 Smin = 10 ** 9 for i in range(n): S = sum(map(int, raw_input().split())) Smax = max(S, Smax) ...
p01321
<h1><font color="#000">Problem A:</font> 期末試験!</h1> <p> 私立桜が丘女子高等学校に通う平沢唯さんは明後日までに進路希望を出さなければならないのだが、困ったことに進路についてまだ何も決めていなかった。 友人の和に相談したところ、和の第一志望はK大と知り、自分もK大に入れるかどうか進路指導の先生に相談にいった。 </p> <p> 相談された進路指導の先生であるあなたは唯さんがK大に入れるかどうかを予想するため唯さんの期末試験の成績を参考にすることにした。 しかし、唯さんは試験の山が当たるかどうかによって大きく成績が左右されるため、過去の期末試験の中で一番良かった時の点数と一番...
3 49 50 87 78 41 27 61 100 45 84 28 88 40 95 66 2 100 100 100 100 100 0 0 0 0 0 1 89 90 85 93 82 0
317 305 500 0 439 439
26,103
s077278851
p01323
u352394527
1546015175
Python
Python3
py
Accepted
70
5624
1,517
t = int(input()) vec = ((1, 0), (0, -1), (-1, 0), (0, 1)) for _ in range(t): def check(x, y, lst, checked): checked[y][x] = False color = mp[y][x] for dx, dy in vec: nx, ny = x + dx, y + dy if color == mp[ny][nx] and checked[ny][nx] == None: lst.append((nx, ny)) check(nx, ny, l...
p01323
<h1><font color="#000">Problem C:</font> コンパイル</h1> <p>東京大学に入学したきたまさ君はTSG(東大スーパーゲーマーズ)というサークルに入った。</p> <p>このサークルは毎年、駒場祭でゲームを展示しており、きたまさ君もゲームを作成して展示することにした。</p> <p>きたまさ君の作成するゲームは次のような、よくある落ち物パズルゲームである。</p> <p> <ul> <li>横6マス×縦12マスの格子状のフィールドがあり、各マスにつき1個のブロックを置くことができる。</li> <li>上からブロックが2つ1組で落下してくる。ブロックには赤・緑・青・黄・紫の5色の基本ブ...
3 ...... ...... ...... ...... ...... ...... ...... ...... .RGB.. RGOP.. RGBPB. RGBPP. GBRGYP GBRRYP BGGRBB BPRGYY GGPRRY BYPPRB YGGGPB GYYYPR YRBRBR YBRBRB BRBRBR BRBRBR ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ..OO.. ..OO..
3 18 0
26,104
s851948858
p01323
u724548524
1528851532
Python
Python3
py
Accepted
90
5628
1,684
def kesu(x, s, c, h): global n if (x[0] - 1, x[1]) not in s and a[x[0] - 1][x[1]] == c: s.add((x[0] - 1, x[1])) kesu((x[0] - 1, x[1]), s, c, h + 1) if (x[0] + 1, x[1]) not in s and a[x[0] + 1][x[1]] == c: s.add((x[0] + 1, x[1])) kesu((x[0] + 1, x[1]), s, c, h + 1) if (x...
p01323
<h1><font color="#000">Problem C:</font> コンパイル</h1> <p>東京大学に入学したきたまさ君はTSG(東大スーパーゲーマーズ)というサークルに入った。</p> <p>このサークルは毎年、駒場祭でゲームを展示しており、きたまさ君もゲームを作成して展示することにした。</p> <p>きたまさ君の作成するゲームは次のような、よくある落ち物パズルゲームである。</p> <p> <ul> <li>横6マス×縦12マスの格子状のフィールドがあり、各マスにつき1個のブロックを置くことができる。</li> <li>上からブロックが2つ1組で落下してくる。ブロックには赤・緑・青・黄・紫の5色の基本ブ...
3 ...... ...... ...... ...... ...... ...... ...... ...... .RGB.. RGOP.. RGBPB. RGBPP. GBRGYP GBRRYP BGGRBB BPRGYY GGPRRY BYPPRB YGGGPB GYYYPR YRBRBR YBRBRB BRBRBR BRBRBR ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ..OO.. ..OO..
3 18 0
26,105
s990047595
p01324
u352394527
1546017338
Python
Python3
py
Accepted
70
5724
775
while True: n = int(input()) if n == 0:break dic = {} for _ in range(n): _, name1, _, val, name2 = input().split() val = int(val.split("^")[1]) if name1 not in dic: dic[name1] = {} if name2 not in dic: dic[name2] = {} dic[name1][name2] = val dic[name2][name1] = -val keys...
p01324
<h1><font color="#000">Problem D:</font> 無矛盾な単位系</h1> <pre> 京、垓、{禾予}、穣、溝、澗、正、載、極、恒河沙、阿僧祇、那由他、不可思議、無量大数 分、厘、毛、糸、忽、微、繊、沙、塵、埃、渺、漠、模糊、逡巡、須臾、瞬息、弾指、刹那、六徳、虚空、清浄、阿頼耶、阿摩羅、涅槃寂静 </pre> <p>これらが何か分かるだろうか。これらは全て10の累乗につけられた数詞である。</p> <pre> 京 = 10<sup>16</sup>, 垓 = 10<sup>20</sup>, {禾予} = 10<sup>24</sup>, 穣 = 10<sup>28</sup>, 溝 = ...
3 1 km = 10^3 m 1 m = 10^2 cm 1 km = 10^5 cm 7 1 kilometre = 10^3 metre 1 megametre = 10^3 kilometre 1 metre = 10^-6 megametre 1 terametre = 10^3 gigametre 1 petametre = 10^3 terametre 1 gigametre = 10^-6 petametre 1 metre = 10^-15 petametre 4 1 a = 10^2 b 1 a = 10^3 c 1 b = 10^2 c 1 c = 10^1 d 4 1 acm = 10^2 icpc 1 ic...
Yes Yes No No
26,106
s834377827
p01324
u724548524
1528853576
Python
Python3
py
Accepted
70
5628
736
while 1: n = int(input()) if n == 0:break m = [] f = 1 for _ in range(n): _, a, _, v, b = input().split() v = int(v[3:]) x, y = -1, -1 for i in range(len(m)): if a in m[i]:x = i if b in m[i]:y = i if x >= 0: if y >= 0: ...
p01324
<h1><font color="#000">Problem D:</font> 無矛盾な単位系</h1> <pre> 京、垓、{禾予}、穣、溝、澗、正、載、極、恒河沙、阿僧祇、那由他、不可思議、無量大数 分、厘、毛、糸、忽、微、繊、沙、塵、埃、渺、漠、模糊、逡巡、須臾、瞬息、弾指、刹那、六徳、虚空、清浄、阿頼耶、阿摩羅、涅槃寂静 </pre> <p>これらが何か分かるだろうか。これらは全て10の累乗につけられた数詞である。</p> <pre> 京 = 10<sup>16</sup>, 垓 = 10<sup>20</sup>, {禾予} = 10<sup>24</sup>, 穣 = 10<sup>28</sup>, 溝 = ...
3 1 km = 10^3 m 1 m = 10^2 cm 1 km = 10^5 cm 7 1 kilometre = 10^3 metre 1 megametre = 10^3 kilometre 1 metre = 10^-6 megametre 1 terametre = 10^3 gigametre 1 petametre = 10^3 terametre 1 gigametre = 10^-6 petametre 1 metre = 10^-15 petametre 4 1 a = 10^2 b 1 a = 10^3 c 1 b = 10^2 c 1 c = 10^1 d 4 1 acm = 10^2 icpc 1 ic...
Yes Yes No No
26,107
s353505727
p01324
u954196415
1597769056
Python
Python3
py
Accepted
90
5680
1,479
#!/usr/bin/env python3 class WeightedUnionFind(): def __init__(self, n): self.n = n self.parents = [-1] * n self.weight = [0] * n def find(self, x): if self.parents[x] < 0: return x else: px = self.find(self.parents[x]) self.weight[x] ...
p01324
<h1><font color="#000">Problem D:</font> 無矛盾な単位系</h1> <pre> 京、垓、{禾予}、穣、溝、澗、正、載、極、恒河沙、阿僧祇、那由他、不可思議、無量大数 分、厘、毛、糸、忽、微、繊、沙、塵、埃、渺、漠、模糊、逡巡、須臾、瞬息、弾指、刹那、六徳、虚空、清浄、阿頼耶、阿摩羅、涅槃寂静 </pre> <p>これらが何か分かるだろうか。これらは全て10の累乗につけられた数詞である。</p> <pre> 京 = 10<sup>16</sup>, 垓 = 10<sup>20</sup>, {禾予} = 10<sup>24</sup>, 穣 = 10<sup>28</sup>, 溝 = ...
3 1 km = 10^3 m 1 m = 10^2 cm 1 km = 10^5 cm 7 1 kilometre = 10^3 metre 1 megametre = 10^3 kilometre 1 metre = 10^-6 megametre 1 terametre = 10^3 gigametre 1 petametre = 10^3 terametre 1 gigametre = 10^-6 petametre 1 metre = 10^-15 petametre 4 1 a = 10^2 b 1 a = 10^3 c 1 b = 10^2 c 1 c = 10^1 d 4 1 acm = 10^2 icpc 1 ic...
Yes Yes No No
26,108
s475206543
p01324
u197615397
1536537408
Python
Python3
py
Accepted
60
5640
1,971
class WeightedUnionFind(object): __slots__ = ["nodes", "weight"] def __init__(self, n: int) -> None: self.nodes = [-1]*n self.weight = [0]*n def get_root(self, x: int) -> int: if x < 0: raise ValueError("Negative Index") if self.nodes[x] < 0: return...
p01324
<h1><font color="#000">Problem D:</font> 無矛盾な単位系</h1> <pre> 京、垓、{禾予}、穣、溝、澗、正、載、極、恒河沙、阿僧祇、那由他、不可思議、無量大数 分、厘、毛、糸、忽、微、繊、沙、塵、埃、渺、漠、模糊、逡巡、須臾、瞬息、弾指、刹那、六徳、虚空、清浄、阿頼耶、阿摩羅、涅槃寂静 </pre> <p>これらが何か分かるだろうか。これらは全て10の累乗につけられた数詞である。</p> <pre> 京 = 10<sup>16</sup>, 垓 = 10<sup>20</sup>, {禾予} = 10<sup>24</sup>, 穣 = 10<sup>28</sup>, 溝 = ...
3 1 km = 10^3 m 1 m = 10^2 cm 1 km = 10^5 cm 7 1 kilometre = 10^3 metre 1 megametre = 10^3 kilometre 1 metre = 10^-6 megametre 1 terametre = 10^3 gigametre 1 petametre = 10^3 terametre 1 gigametre = 10^-6 petametre 1 metre = 10^-15 petametre 4 1 a = 10^2 b 1 a = 10^3 c 1 b = 10^2 c 1 c = 10^1 d 4 1 acm = 10^2 icpc 1 ic...
Yes Yes No No
26,109
s605531484
p01333
u352394527
1546029336
Python
Python3
py
Accepted
40
5608
176
while True: a, b = map(int, input().split()) if a == 0 and b == 0:break w = b - a x = w // 1000 w %= 1000 y = w // 500 w %= 500 z = w // 100 print(z, y, x)
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,110
s582432642
p01333
u537067968
1551621515
Python
Python3
py
Accepted
50
5616
304
while True: s,p = list(map(int,input().split())) if s+p == 0: break sa = p-s a100 = 0 a500 = 0 a1000 = 0 if sa != 0: a1000 = sa/1000 sa = sa%1000 a500 = sa/500 sa = sa%500 a100 = sa/100 print(int(a100),int(a500),int(a1000))
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,111
s215901278
p01333
u260980560
1432571305
Python
Python
py
Accepted
20
4196
181
while 1: a, b = map(int, raw_input().split()) if not b: break s = b-a s /= 100 c10 = s/10 s -= c10*10 c5 = s/5 s -= c5*5 print s, c5, c10
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,112
s469110308
p01333
u873482706
1434518015
Python
Python
py
Accepted
20
4228
1,156
def calculate1(): change = B - A if change % 1000 == 0: one_thousand_count = change / 1000 print_result(one_thousand_count) else: one_thousand_count = change / 1000 remainder = change - one_thousand_count * 1000 calculate2(remainder, one_thousand_count) def c...
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,113
s302951468
p01333
u078042885
1484329485
Python
Python3
py
Accepted
40
7528
130
while 1: b,c=map(int,(input().split())) if b==0:break d,b=divmod(c-b,1000) e,b=divmod(b,500) print(b//100,e,d)
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,114
s000272007
p01333
u104911888
1368282646
Python
Python
py
Accepted
20
4228
216
while True: A,B=map(int,raw_input().split()) if A==B==0:break t=B-A L=[1000,500,100] T=[] for i in range(len(L)): T.append(t/L[i]) t%=L[i] print "%d %d %d"%(T[2],T[1],T[0])
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,115
s998186119
p01333
u759949288
1374819904
Python
Python
py
Accepted
10
4304
202
while True: a, b = [int(n) for n in raw_input().split()] if a == 0 and b == 0: break x = b - a res = [] for c in (1000, 500, 100): res += [str(int(x / c))] x %= c print " ".join(reversed(res))
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,116
s205985717
p01333
u454358619
1378115132
Python
Python
py
Accepted
20
4232
313
import sys def solve(): while True: v,m = map(int,raw_input().split()) if [v,m] == [0,0]: return r1,r5,r10 = 0,0,0 re = m - v r10 = re / 1000 re %= 1000 r5 = re / 500 re %= 500 r1 = re / 100 print str(r1) + " " + str(r5) + " " + str(r10) if __name__ == "__main__": solve()
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,117
s910433411
p01333
u633068244
1398928814
Python
Python
py
Accepted
20
4200
142
while 1: a,b = map(int,raw_input().split()) if a == 0: break c = b-a t = c/1000 f = (c-1000*t)/500 h = (c-1000*t-500*f)/100 print h,f,t
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,118
s486567652
p01333
u240091169
1590885369
Python
Python3
py
Accepted
40
5612
276
while True : a, b = map(int, input().split()) if a == 0 and b == 0 : break cost = b - a ans_1000 = cost // 1000 cost = cost % 1000 ans_500 = cost // 500 cost = cost % 500 ans_100 = cost // 100 print(ans_100, ans_500, ans_1000)
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,119
s353614923
p01333
u842461513
1588990236
Python
Python3
py
Accepted
50
5612
559
while True: #永遠にループをする a = b = c = 0 #変数の初期化 i,j = map(int,input().split()) #標準入力 if i == 0 and j == 0:break #入力値が両方0ならループを終了する else: #そうでなければ j -= i #差額を計算する a = j // 1000 #1000円札の必要枚数を計算する b = (j - a * 1000) // 500 #500円の必要枚数を計算する c = (j - a * 1000 - b * 500) // 100 #10...
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,120
s057458857
p01333
u492405338
1578200530
Python
Python3
py
Accepted
40
5616
213
while 1: a, b = [int(i) for i in input().split()] if a == 0 and b == 0: break n = b - a t = n // 1000 n = n % 1000 f = n // 500 n = n % 500 h = n // 100 print(h, f, t)
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,121
s908178506
p01333
u037441960
1570692030
Python
Python3
py
Accepted
40
5620
302
while True : A, B = map(int, input().split()) if(A == 0) : break else : C = [0, 0, 0] s = B - A C[2] = s // 1000 C[1] = (s - C[2] * 1000) // 500 C[0] = (s - (C[2] * 1000 + C[1] * 500)) // 100 print(C[0], C[1], C[2])
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,122
s524448632
p01333
u990228206
1554458125
Python
Python3
py
Accepted
40
5612
117
while 1: a,b=map(int,input().split()) if a==b==0:break c=b-a print((c%500//100),c%1000//500,c//1000)
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,123
s708780051
p01333
u813675766
1548927382
Python
Python3
py
Accepted
40
5620
169
while True: a, b = map(int, input().split()) if(b == 0): break b -= a print(" ".join([str(x) for x in [b%500//100, b%1000//500, b//1000]]))
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,124
s440274620
p01333
u158979022
1544447829
Python
Python3
py
Accepted
50
5616
143
while True: a, b = map(int, input().split()) if a == 0: break s, a = divmod(b-a, 1000) f, a = divmod(a, 500) print(a//100, f, s)
p01333
<h1><font color="#000">Problem A:</font> Summer of KMC</h1> <h2>Description</h2> <p>KMCはコミックマーケットと呼ばれる同人即売会で毎年CDを販売している。 コミックマーケットでCDを売ることになったFであったが、Fの人気により、KMCの売り場には人が殺到し、お釣りの計算が追いつかない状態となった。そこでFは金額を入力すると即座にお釣りを出力するプログラムを書くことにした。</p> <p>KMCが釣り銭として用意しているのは、100円玉と500円玉と1000円札のみである。これらの硬貨・札は無限にあるものと考えて良い。お釣りは、硬貨・札の個...
500 1000 100 10000 400 700 600 5000 10000 10000 0 0
0 1 0 4 1 9 3 0 0 4 0 4 0 0 0
26,125
s158893337
p01337
u677563181
1596500469
Python
Python3
py
Accepted
60
5760
2,949
import math n = int(input()) def F(a, b, c, d) : return lambda x : a * x**3 + b * x**2 + c * x + d def X(a, b, c) : a = 3 * a b = 2 * b try : D = math.sqrt(b**2 - 4 * a * c) if D == 0 : return 0 else : return (-b + D) / (2 * a), (-b - ...
p01337
<h1><font color="#000">Problem E:</font> The Number of the Real Roots of a Cubic Equation</h1> <h2>Description</h2> <p>3次方程式:<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_03Emath" alt="ax^3+bx^2+cx+d=0"> が与えられるので,その正の実数根の個数,負の実数根の個数をそれぞれ調べて欲しい.</p> <p>根の個数は,重根も含めて数えるものとする.</p> <h2>Input</h2> <p>入...
2 1 3 3 1 -10 0 0 0
0 3 0 0
26,126
s742262820
p01337
u555228137
1596460418
Python
Python3
py
Accepted
60
5824
2,573
n=int(input()) def f(a,b,c,d): return lambda x:a*x**3+b*x**2+c*x+d for i in range(n): a,b,c,d=map(int,input().split()) fx=f(a,b,c,d) D=b**2-3*a*c if D<=0 : if d==0: pl=mi=0 elif (a>0 and d<0) or (a<0 and d>0): pl,mi=1,0 elif (a<0 and d<0) or (a>0 and d...
p01337
<h1><font color="#000">Problem E:</font> The Number of the Real Roots of a Cubic Equation</h1> <h2>Description</h2> <p>3次方程式:<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_03Emath" alt="ax^3+bx^2+cx+d=0"> が与えられるので,その正の実数根の個数,負の実数根の個数をそれぞれ調べて欲しい.</p> <p>根の個数は,重根も含めて数えるものとする.</p> <h2>Input</h2> <p>入...
2 1 3 3 1 -10 0 0 0
0 3 0 0
26,127
s731464432
p01337
u895962529
1595503294
Python
Python3
py
Accepted
70
5756
2,949
import math n = int(input()) def F(a, b, c, d) : return lambda x : a * x**3 + b * x**2 + c * x + d def X(a, b, c) : a = 3 * a b = 2 * b try : D = math.sqrt(b**2 - 4 * a * c) if D == 0 : return 0 else : return (-b + D) / (2 * a), (-b - ...
p01337
<h1><font color="#000">Problem E:</font> The Number of the Real Roots of a Cubic Equation</h1> <h2>Description</h2> <p>3次方程式:<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_03Emath" alt="ax^3+bx^2+cx+d=0"> が与えられるので,その正の実数根の個数,負の実数根の個数をそれぞれ調べて欲しい.</p> <p>根の個数は,重根も含めて数えるものとする.</p> <h2>Input</h2> <p>入...
2 1 3 3 1 -10 0 0 0
0 3 0 0
26,128
s819159746
p01337
u747915832
1590730248
Python
Python3
py
Accepted
60
5824
4,600
import math def make_func1(a, b, c, d): return lambda X : a*X**3 + b*X**2 + c*X + d def make_func2(a, b, c): return lambda x : 3*a*x**2 + 2*b*x + c i = int(input()) for j in range(i): a, b, c, d = map(int, input().split()) fX = make_func1(a, b, c, d) fx = make_func2(a, b, c) D_4 = b**2 - 3*a*c...
p01337
<h1><font color="#000">Problem E:</font> The Number of the Real Roots of a Cubic Equation</h1> <h2>Description</h2> <p>3次方程式:<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_03Emath" alt="ax^3+bx^2+cx+d=0"> が与えられるので,その正の実数根の個数,負の実数根の個数をそれぞれ調べて欲しい.</p> <p>根の個数は,重根も含めて数えるものとする.</p> <h2>Input</h2> <p>入...
2 1 3 3 1 -10 0 0 0
0 3 0 0
26,129
s553496916
p01337
u037441960
1589617649
Python
Python3
py
Accepted
60
5760
2,967
import math n = int(input()) def F(a, b, c, d) : return lambda x : a * x**3 + b * x**2 + c * x + d def X(a, b, c) : a = 3 * a b = 2 * b try : D = math.sqrt(b**2 - 4 * a * c) if D == 0 : return 0 else : return (-b + D) / (2 * a), (-b - ...
p01337
<h1><font color="#000">Problem E:</font> The Number of the Real Roots of a Cubic Equation</h1> <h2>Description</h2> <p>3次方程式:<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_03Emath" alt="ax^3+bx^2+cx+d=0"> が与えられるので,その正の実数根の個数,負の実数根の個数をそれぞれ調べて欲しい.</p> <p>根の個数は,重根も含めて数えるものとする.</p> <h2>Input</h2> <p>入...
2 1 3 3 1 -10 0 0 0
0 3 0 0
26,130
s881517694
p01339
u266872031
1528731419
Python
Python
py
Accepted
20
4904
1,279
import sys def func(d, S, D): if S[d] == []: return 2, [d] else: tmp = 1 used=[d] for k in S[d]: ret = func(k,S,D) tmp *= ret[0] used += ret[1] return tmp+1 , used sys.setrecursionlimit(100000) N,M=map(int,raw_input().split()) S=[[] f...
p01339
<H1><font color="#000">Problem A: </font>Alien's Counting</H1> <p> Natsuki and her friends were taken to the space by an alien and made friends with a lot of aliens. During the space travel, she discovered that aliens’ hands were often very different from humans’. Generally speaking, in a kind of aliens, there are <i...
5 4 2 3 3 4 4 3 5 4
10
26,131
s462335470
p01339
u260980560
1585329052
Python
Python3
py
Accepted
30
6292
1,552
import sys readline = sys.stdin.readline write = sys.stdout.write sys.setrecursionlimit(10**6) def scc(N, G, RG): order = [] used = [0]*N group = [None]*N def dfs(s): used[s] = 1 for t in G[s]: if not used[t]: dfs(t) order.append(s) def rdfs(s, col...
p01339
<H1><font color="#000">Problem A: </font>Alien's Counting</H1> <p> Natsuki and her friends were taken to the space by an alien and made friends with a lot of aliens. During the space travel, she discovered that aliens’ hands were often very different from humans’. Generally speaking, in a kind of aliens, there are <i...
5 4 2 3 3 4 4 3 5 4
10
26,132
s942774270
p01339
u509278866
1539310863
Python
Python3
py
Accepted
80
9688
2,461
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**13 mod = 10**9+7 dd = [(-1,0),(0,1),(1,0),(0,-1)] ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): return [int(x) for x in sys.stdin....
p01339
<H1><font color="#000">Problem A: </font>Alien's Counting</H1> <p> Natsuki and her friends were taken to the space by an alien and made friends with a lot of aliens. During the space travel, she discovered that aliens’ hands were often very different from humans’. Generally speaking, in a kind of aliens, there are <i...
5 4 2 3 3 4 4 3 5 4
10
26,133
s745932764
p01356
u231562319
1506627836
Python
Python3
py
Accepted
40
7812
543
def solve(): n,m,a,b,p,q = map(int,input().split()) if a==1 and b==1: if (p+q)*n <= m: return m - (p+q)*n else: k = m//(p+q) return min(m-k*(p+q),(k+1)*(p+q)-m) else: ans = m for i in range(min(n-1,40),-1,-1): f = p*(a**i) + q*(...
p01356
<H1>Problem H: Nearest Station</H1> <p> うさぎがある電車のチケットを<i>n</i> 枚持っている. チケットにはそれぞれ0 から<i>n</i> − 1 までの番号がついていて, <i>k</i> 番のチケットを使うと, <i>p</i>&sdot;<i>a<sup>k</sup></i> + <i>q</i>&sdot;<i>b<sup>k</sup></i> 駅進むことができる. </p> <p> うさぎは今いる駅から<i>m</i> 駅進んだ駅にあるニンジン食べ放題の店に行きたいが, なるべく歩く距離を短くしたい. 駅は等間隔に並んでいる. チケットを電車の上り線で進むことの...
6 200 2 3 4 5
1
26,134
s006718782
p01362
u260980560
1584718684
Python
Python3
py
Accepted
40
5984
1,535
from collections import deque def main(): I = { 1: ((6, 0), (2, 1), (5, 2), (4, 3)), 2: ((6, 3), (3, 1), (5, 3), (1, 3)), 3: ((6, 2), (4, 1), (5, 0), (2, 3)), 4: ((6, 1), (1, 1), (5, 1), (3, 3)), 5: ((1, 0), (2, 0), (3, 0), (4, 0)), 6: ((1, 2), (2, 2), (3, 2), (4, 2))...
p01362
<H1><font color="#000">Problem D:</font> Dice Room</H1> <p> You are playing a popular video game which is famous for its depthful story and interesting puzzles. In the game you were locked in a mysterious house alone and there is no way to call for help, so you have to escape on yours own. However, almost every room ...
... ... .*. ... ... .*. ... ... ... ... ... .*. ... ... .*. ... ... ... ... .*. ... *.. ... ..* *.* *.* *.* *.* .*. *.* *.. .*. ..* *.* ... *.* ... .*. .*. ... .** *.. ... ... .*. .*. ... *.. ..* ... .** ... *.. ... #
3 1 0
26,135
s465428321
p01364
u260980560
1586272356
Python
Python3
py
Accepted
40
5760
2,272
from math import pi, cos, sin def solve(): def rotate(x, y, theta): cv = cos(theta); sv = sin(theta) return x*cv - y*sv, x*sv + y*cv N, D = map(int, input().split()) if N == D == 0: return False x0 = -D; x1 = D y0 = y1 = 0 for i in range(N): dl, dr, t = map(int, i...
p01364
<H1><font color="#000">Problem F:</font> Two-Wheel Buggy</H1> <p> International Car Production Company (ICPC), one of the largest automobile manufacturers in the world, is now developing a new vehicle called "Two-Wheel Buggy". As its name suggests, the vehicle has only two wheels. Quite simply, "Two-Wheel Buggy" is m...
1 1 180 90 2 1 1 180 180 20 2 10 360 -360 5 -90 360 8 3 2 100 60 9 -72 -72 10 -45 -225 5 0 0
3.00000 3.00000 0.00000 62.83185 12.00000 0.00000 -2.44505 13.12132
26,136
s604235094
p01388
u352394527
1546141404
Python
Python3
py
Accepted
30
5956
115
from collections import Counter d = Counter(list("KUPC" + input())) print(min(d["K"], d["U"], d["P"], d["C"]) - 1)
p01388
<script src="./IMAGE/varmath.js" charset="UTF-8"></script> <h1><font color="#000">問題 A </font> KUPC</h1> <h2>問題文</h2> <p>とある学生が,Kyoto University Programming Contest (KUPC) を開こうと考えた.そこで彼は,看板を作って皆に宣伝することにした.今,手元にはアルファベット <var>1</var> 文字の書かれた板がいくつもある.これらの板から <tt>'K'</tt>,<tt>'U'</tt>,<tt>'P'</tt>,<tt>'C'</tt> という文字の書...
KUPCkupcKUPC
2
26,228
s268392540
p01388
u827448139
1419097704
Python
Python3
py
Accepted
40
6728
53
s=input() print(min(map(lambda c:s.count(c),"KUPC")))
p01388
<script src="./IMAGE/varmath.js" charset="UTF-8"></script> <h1><font color="#000">問題 A </font> KUPC</h1> <h2>問題文</h2> <p>とある学生が,Kyoto University Programming Contest (KUPC) を開こうと考えた.そこで彼は,看板を作って皆に宣伝することにした.今,手元にはアルファベット <var>1</var> 文字の書かれた板がいくつもある.これらの板から <tt>'K'</tt>,<tt>'U'</tt>,<tt>'P'</tt>,<tt>'C'</tt> という文字の書...
KUPCkupcKUPC
2
26,229
s280564718
p01388
u827448139
1419097817
Python
Python3
py
Accepted
40
6728
48
s=input() print(min(s.count(c) for c in "KUPC"))
p01388
<script src="./IMAGE/varmath.js" charset="UTF-8"></script> <h1><font color="#000">問題 A </font> KUPC</h1> <h2>問題文</h2> <p>とある学生が,Kyoto University Programming Contest (KUPC) を開こうと考えた.そこで彼は,看板を作って皆に宣伝することにした.今,手元にはアルファベット <var>1</var> 文字の書かれた板がいくつもある.これらの板から <tt>'K'</tt>,<tt>'U'</tt>,<tt>'P'</tt>,<tt>'C'</tt> という文字の書...
KUPCkupcKUPC
2
26,230
s110526581
p01388
u572790226
1465807332
Python
Python3
py
Accepted
40
7468
210
# -*- coding: utf-8 -*- """ Created on Mon Jun 13 17:35:46 2016 """ D = {"K":0, "U":0, "P":0, "C":0} S = input() for s in S: if s in D: D[s] += 1 print(min(D["K"], D["U"], D["P"], D["C"]))
p01388
<script src="./IMAGE/varmath.js" charset="UTF-8"></script> <h1><font color="#000">問題 A </font> KUPC</h1> <h2>問題文</h2> <p>とある学生が,Kyoto University Programming Contest (KUPC) を開こうと考えた.そこで彼は,看板を作って皆に宣伝することにした.今,手元にはアルファベット <var>1</var> 文字の書かれた板がいくつもある.これらの板から <tt>'K'</tt>,<tt>'U'</tt>,<tt>'P'</tt>,<tt>'C'</tt> という文字の書...
KUPCkupcKUPC
2
26,231
s740219343
p01388
u073628131
1477965474
Python
Python
py
Accepted
20
6436
217
# coding: utf-8 s = raw_input(); k = u = p = c = 0; for a in s: if a == 'K': k += 1; if a == 'U': u += 1; if a == 'P': p += 1; if a == 'C': c += 1; print min(k,u,p,c);
p01388
<script src="./IMAGE/varmath.js" charset="UTF-8"></script> <h1><font color="#000">問題 A </font> KUPC</h1> <h2>問題文</h2> <p>とある学生が,Kyoto University Programming Contest (KUPC) を開こうと考えた.そこで彼は,看板を作って皆に宣伝することにした.今,手元にはアルファベット <var>1</var> 文字の書かれた板がいくつもある.これらの板から <tt>'K'</tt>,<tt>'U'</tt>,<tt>'P'</tt>,<tt>'C'</tt> という文字の書...
KUPCkupcKUPC
2
26,232
s686216810
p01388
u078042885
1484402438
Python
Python3
py
Accepted
20
7536
48
s=input() print(min(s.count(i) for i in 'KUPC'))
p01388
<script src="./IMAGE/varmath.js" charset="UTF-8"></script> <h1><font color="#000">問題 A </font> KUPC</h1> <h2>問題文</h2> <p>とある学生が,Kyoto University Programming Contest (KUPC) を開こうと考えた.そこで彼は,看板を作って皆に宣伝することにした.今,手元にはアルファベット <var>1</var> 文字の書かれた板がいくつもある.これらの板から <tt>'K'</tt>,<tt>'U'</tt>,<tt>'P'</tt>,<tt>'C'</tt> という文字の書...
KUPCkupcKUPC
2
26,233
s465616309
p01388
u104911888
1368283223
Python
Python
py
Accepted
20
4200
51
s=raw_input() print min(s.count(c) for c in "KUPC")
p01388
<script src="./IMAGE/varmath.js" charset="UTF-8"></script> <h1><font color="#000">問題 A </font> KUPC</h1> <h2>問題文</h2> <p>とある学生が,Kyoto University Programming Contest (KUPC) を開こうと考えた.そこで彼は,看板を作って皆に宣伝することにした.今,手元にはアルファベット <var>1</var> 文字の書かれた板がいくつもある.これらの板から <tt>'K'</tt>,<tt>'U'</tt>,<tt>'P'</tt>,<tt>'C'</tt> という文字の書...
KUPCkupcKUPC
2
26,234
s876497494
p01388
u454358619
1378256151
Python
Python
py
Accepted
20
4216
276
import sys def solve(): L = raw_input() data = [] data.append(L.count("K")) data.append(L.count("U")) data.append(L.count("P")) data.append(L.count("C")) print min(data) if __name__ == "__main__": solve()
p01388
<script src="./IMAGE/varmath.js" charset="UTF-8"></script> <h1><font color="#000">問題 A </font> KUPC</h1> <h2>問題文</h2> <p>とある学生が,Kyoto University Programming Contest (KUPC) を開こうと考えた.そこで彼は,看板を作って皆に宣伝することにした.今,手元にはアルファベット <var>1</var> 文字の書かれた板がいくつもある.これらの板から <tt>'K'</tt>,<tt>'U'</tt>,<tt>'P'</tt>,<tt>'C'</tt> という文字の書...
KUPCkupcKUPC
2
26,235