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
s553286789
p00028
u072398496
1489290402
Python
Python
py
Accepted
10
6284
107
import sys c=[0]*101 for n in sys.stdin: c[int(n)]+=1 m=max(c) for i in range(101): if c[i]==m: print i
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,202
s143993987
p00028
u318658123
1489490608
Python
Python3
py
Accepted
20
7620
408
import sys if __name__ == '__main__': nums = [] piles = [0 for i in range(0,101)] for n in sys.stdin: if n == "\n": break else : nums.append(int(n)) for n in nums: piles[n] += 1 maxnum = 0 for p in piles: if maxnum < p: maxnum = p for i,p in enumerate(piles): if maxnum == p: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,203
s371036287
p00028
u964040941
1489761112
Python
Python3
py
Accepted
20
7576
217
A = [] while True: try: A.append(int(input())) except EOFError: break cnt = [0] * 101 for i in A: cnt [i] += 1 mx = max(cnt) for i in range(1,101): if cnt [i] == mx: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,204
s722797976
p00028
u518711553
1491500899
Python
Python3
py
Accepted
40
7860
203
import sys from collections import defaultdict d = defaultdict(int) for i in sys.stdin: d[int(i)] +=1 m = max(v for v in d.values()) for i in sorted([k for k, v in d.items() if v == m]): print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,205
s924565101
p00028
u901080241
1491632470
Python
Python3
py
Accepted
30
7476
238
ans = [0]*101 while True: try: ans[int(input())] += 1 except EOFError: break printqueue = [] maxi = max(ans) for i in range(1,101): if ans[i] == maxi : printqueue.append(i) for elm in printqueue: print(elm)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,206
s507509419
p00028
u462831976
1492767761
Python
Python3
py
Accepted
30
7964
267
# -*- coding: utf-8 -*- import sys import os import datetime d = {} for s in sys.stdin: v = int(s) if v not in d: d[v] = 1 else: d[v] += 1 max_value = max(d.values()) for key in d.keys(): if d[key] == max_value: print(key)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,207
s546229065
p00028
u421983421
1496067519
Python
Python
py
Accepted
10
6268
288
cnt = [] for i in range(0, 101): cnt.append(0) while True: try: n = int(raw_input()) cnt[n] += 1 except: break tmp = 0 lst = [] for i in range(1, 101): if tmp < cnt[i]: tmp = cnt[i] lst = [i] elif tmp == cnt[i]: lst.append(i) for i in range(0, len(lst)): print lst[i]
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,208
s482413586
p00028
u905313459
1496474336
Python
Python3
py
Accepted
30
7872
175
import sys from collections import Counter v = Counter([int(i) for i in sys.stdin.readlines()]).most_common() j = [print(i) for i in sorted([k for k, l in v if l == v[0][1]])]
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,209
s185277899
p00028
u821624310
1502835621
Python
Python3
py
Accepted
30
7668
261
import sys d = {i:0 for i in range(1, 101)} for n in sys.stdin: if n == "\n": break else: d[int(n)] += 1 sort = sorted(d.items(), key=lambda x: x[1], reverse=True) mode = sort[0] for n in sort: if mode[1] == n[1]: print(n[0])
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,210
s736398779
p00028
u584777171
1503361829
Python
Python3
py
Accepted
20
7512
309
import sys a = {} ma = 0 m = [] for u in sys.stdin: i = int(u) if not (i in a): a[i] = 1 else: a[i] += 1 # ???????????§????????±??? if ma <= a[i]: if ma < a[i]: ma = a[i] m.clear() m.append(i) m = sorted(m) for k in m: print(k)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,211
s437483195
p00028
u546285759
1504163173
Python
Python3
py
Accepted
20
7564
164
a = [0] * 101 while True: try: a[int(input())] += 1 except: break maxv = max(a) for i, v in enumerate(a): if maxv == v: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,212
s747075038
p00028
u957021183
1504849292
Python
Python3
py
Accepted
30
7688
387
# Aizu Problem 0028: Mode Value # import sys, math, os # read input: PYDEV = os.environ.get('PYDEV') if PYDEV=="True": sys.stdin = open("sample-input.txt", "rt") counts = {} while True: try: a = int(input()) except EOFError: break counts[a] = counts.get(a, 0) + 1 for a in sorted([a for a in counts if counts[a] == max(counts.values())]): print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,213
s716987253
p00028
u184989919
1505712950
Python
Python3
py
Accepted
30
7632
237
import sys def ModeValue(): mode=[0 for i in range(0,101)] for n in sys.stdin: mode[int(n)]+=1 maxN=max(mode) for i in range(0,101): if mode[i]==maxN: print(i) ModeValue()
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,214
s259054784
p00028
u933096856
1506369491
Python
Python3
py
Accepted
20
7620
273
d={} try: while True: n=int(input()) if n in d: d[n]+=1 else: d[n]=1 except EOFError: pass a=[] m=max(d.values()) for key, value in d.items(): if value == m: a.append(key) a.sort() for i in a: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,215
s647114703
p00028
u933096856
1506369517
Python
Python
py
Accepted
10
6304
276
d={} try: while True: n=int(raw_input()) if n in d: d[n]+=1 else: d[n]=1 except EOFError: pass a=[] m=max(d.values()) for key, value in d.items(): if value == m: a.append(key) a.sort() for i in a: print i
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,216
s563618066
p00028
u072398496
1508295261
Python
Python
py
Accepted
10
6440
172
import sys nums = map(int, sys.stdin) counter = [0 for i in range(101)] for n in nums: counter[n] += 1 m = max(counter) for i in range(101): if m == counter[i]: print i
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,217
s358681655
p00028
u845643816
1509254860
Python
Python3
py
Accepted
30
8052
334
# 0028 import collections array = [0]*100 i = 0 while True: try: a = input() array[i] = int(a) i += 1 except EOFError: break array = filter(lambda a: a != 0, array) counter = collections.Counter(array).most_common() for a, count in counter: if count < counter[0][1]: break print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,218
s833675228
p00028
u845643816
1509257624
Python
Python3
py
Accepted
30
7600
303
# 0028 array = [] while True: try: a = input() if a == '': break array.append(int(a)) except EOFError: break count = list(map(lambda a: array.count(a), set(array))) modes = list(filter(lambda a: array.count(a) == max(count), set(array))) print(*modes, sep = '\n')
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,219
s514695273
p00028
u845643816
1509257634
Python
Python3
py
Accepted
30
7692
277
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break count = list(map(lambda a: array.count(a), set(array))) modes = list(filter(lambda a: array.count(a) == max(count), set(array))) print(*modes, sep = '\n')
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,220
s046003800
p00028
u845643816
1509259712
Python
Python3
py
Accepted
30
7688
287
# 0028 array = [] while True: try: a = input() if a == '': break array.append(int(a)) except EOFError: break s = set(array) mx = max(list(map(lambda a: array.count(a), set(array)))) for a in sorted(s): if array.count(a) == mx: print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,221
s638647538
p00028
u845643816
1509259733
Python
Python3
py
Accepted
30
7684
278
# 0028 array = [] while True: try: a = input() if a == '': break array.append(int(a)) except EOFError: break s = set(array) mx = max(list(map(lambda a: array.count(a), s))) for a in sorted(s): if array.count(a) == mx: print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,222
s675153095
p00028
u845643816
1509259739
Python
Python3
py
Accepted
50
7788
252
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = max(list(map(lambda a: array.count(a), s))) for a in sorted(s): if array.count(a) == mx: print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,223
s747558937
p00028
u845643816
1509259749
Python
Python3
py
Accepted
20
7692
252
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = max(list(map(lambda a: array.count(a), s))) for a in sorted(s): if array.count(a) == mx: print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,224
s085079943
p00028
u845643816
1509259967
Python
Python3
py
Accepted
30
7684
276
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = max(list(map(lambda a: array.count(a), s))) modes = list(filter(lambda a: array.count(a) == mx, sorted(s))) print(*modes, sep = '\n')
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,225
s350871260
p00028
u845643816
1509259971
Python
Python3
py
Accepted
30
7728
276
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = max(list(map(lambda a: array.count(a), s))) modes = list(filter(lambda a: array.count(a) == mx, sorted(s))) print(*modes, sep = '\n')
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,226
s218585695
p00028
u845643816
1509260505
Python
Python3
py
Accepted
30
7692
298
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) count= list(map(lambda a: array.count(a), s)) mx = max(count) modes = list(list(s)[i] for i, x in enumerate(count) if x == mx) print(*sorted(modes), sep = '\n')
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,227
s150656248
p00028
u845643816
1509260510
Python
Python3
py
Accepted
30
7764
298
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) count= list(map(lambda a: array.count(a), s)) mx = max(count) modes = list(list(s)[i] for i, x in enumerate(count) if x == mx) print(*sorted(modes), sep = '\n')
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,228
s920101282
p00028
u845643816
1509260580
Python
Python3
py
Accepted
30
7692
290
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) count= list(map(lambda a: array.count(a), s)) mx = max(count) modes = list(list(s)[i] for i, x in enumerate(count) if x == mx) print(*modes, sep = '\n')
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,229
s474790873
p00028
u845643816
1509261089
Python
Python3
py
Accepted
20
7692
251
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = array.count(max(array, key = array.count)) for a in sorted(s): if array.count(a) == mx: print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,230
s140414501
p00028
u845643816
1509261093
Python
Python3
py
Accepted
20
7532
251
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = array.count(max(array, key = array.count)) for a in sorted(s): if array.count(a) == mx: print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,231
s332191979
p00028
u845643816
1509261207
Python
Python3
py
Accepted
30
7576
247
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = array.count(max(s, key = array.count)) for a in sorted(s): if array.count(a) == mx: print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,232
s449651128
p00028
u845643816
1509261211
Python
Python3
py
Accepted
20
7696
247
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = array.count(max(s, key = array.count)) for a in sorted(s): if array.count(a) == mx: print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,233
s598292921
p00028
u845643816
1509261227
Python
Python3
py
Accepted
50
7572
247
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = array.count(max(s, key = array.count)) for a in sorted(s): if array.count(a) == mx: print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,234
s123370825
p00028
u845643816
1509261230
Python
Python3
py
Accepted
30
7540
247
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = array.count(max(s, key = array.count)) for a in sorted(s): if array.count(a) == mx: print(a)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,235
s008857795
p00028
u845643816
1509261635
Python
Python3
py
Accepted
20
7620
270
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = max(sorted(s, reverse=True), key = array.count) for a in sorted(s, key = array.count, reverse=True): print(a) if a == mx: break
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,236
s034796000
p00028
u845643816
1509261639
Python
Python3
py
Accepted
30
7612
270
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = max(sorted(s, reverse=True), key = array.count) for a in sorted(s, key = array.count, reverse=True): print(a) if a == mx: break
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,237
s542630245
p00028
u845643816
1509261641
Python
Python3
py
Accepted
30
7568
270
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = max(sorted(s, reverse=True), key = array.count) for a in sorted(s, key = array.count, reverse=True): print(a) if a == mx: break
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,238
s751782055
p00028
u845643816
1509261660
Python
Python3
py
Accepted
50
7568
270
# 0028 array = [] while True: try: a = input() array.append(int(a)) except EOFError: break s = set(array) mx = max(sorted(s, reverse=True), key = array.count) for a in sorted(s, key = array.count, reverse=True): print(a) if a == mx: break
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,239
s569853290
p00028
u917432951
1511919859
Python
Python3
py
Accepted
20
5600
231
import sys if __name__ == '__main__': a = [0]*101 for tmp_line in sys.stdin: n = (int)(tmp_line) a[n-1] += 1 b = [i+1 for i,x in enumerate(a) if x == max(a)] b.sort() for x in b: print(x)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,240
s054483991
p00028
u236679854
1512599487
Python
Python3
py
Accepted
20
5600
239
num = [0] * 100 mode = 0 while True: try: a = int(input()) num[a-1] += 1 if num[a-1] > mode: mode = num[a-1] except: break for i, n in enumerate(num): if n == mode: print(i+1)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,241
s495718660
p00028
u205327055
1513438443
Python
Python
py
Accepted
10
4636
182
seisuu = [0] * 100 try: while True: a = input() seisuu[a] += 1 except: b = max(seisuu) for i in range(100): if b == seisuu[i]: print i
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,242
s310395420
p00028
u299798926
1513757748
Python
Python3
py
Accepted
20
5596
190
lis=[0 for i in range(100)] while True: try: x= int(input()) lis[x-1]+=1 except : break ma=max(lis) for i in range(100): if ma==lis[i]: print(i+1)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,243
s498973450
p00028
u471400255
1514307589
Python
Python3
py
Accepted
30
6016
283
from sys import stdin from collections import Counter data = Counter([i for i in range(1, 101)]) for line in stdin: data[int(line.replace('\n', ''))] += 1 mode = data.most_common(1)[0][1] for po in range(1, 101): if data[po] == mode: print(po) else: pass
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,244
s415209913
p00028
u585035894
1514628388
Python
Python3
py
Accepted
20
5604
214
import sys d = {i:0 for i in range(1,101)} for i in map(int, sys.stdin): d[i] += 1 s = sorted(d.items(), key=lambda x: x[1], reverse=True) m = s[0][1] for i in s: if i[1] < m: break print(i[0])
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,245
s818850147
p00028
u028347703
1514781086
Python
Python3
py
Accepted
20
5600
189
import sys data = [0] * 101 for line in sys.stdin: try: n = int(line) data[n] += 1 except: break m = max(data) for i in range(len(data)): if data[i] == m: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,246
s613388576
p00028
u600263347
1514870902
Python
Python3
py
Accepted
20
5600
246
def main(): Array = [0]*100 while True: try: Array[int(input())-1] += 1 except EOFError: break [print(i+1) for i in range(100) if Array[i] == max(Array)] if __name__ == '__main__': main()
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,247
s897917745
p00028
u009288816
1515321444
Python
Python
py
Accepted
10
4652
289
import sys l = [] for input in sys.stdin: l.append(int(input)) l = sorted(l) d = {} for i in range(0,len(l)): d[l[i]] = l.count(l[i]) max = 0 for key,value in d.items(): if(value > max): max = value for key,value in d.items(): if(value == max): print key
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,248
s960456942
p00028
u024715419
1516176551
Python
Python3
py
Accepted
20
5600
307
a = {} while True: try: a_i = int(input()) if a_i in a: a[a_i] += 1 else: a[a_i] = 1 except: break mode_count = max(a.values()) b = [] for key, value in a.items(): if value == mode_count: b.append(key) print(*sorted(b),sep="\n")
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,249
s930053433
p00028
u024715419
1516176583
Python
Python3
py
Accepted
20
5596
310
a = {} while True: try: a_i = int(input()) if a_i in a: a[a_i] += 1 else: a[a_i] = 1 except: break mode_count = max(a.values()) b = [] for key, value in a.items(): if value == mode_count: b.append(key) print(*sorted(b),sep="\n")
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,250
s094814719
p00028
u957840591
1516438502
Python
Python3
py
Accepted
20
5600
358
count = [0 for i in range(100)] while True: try: count[int(input()) - 1] += 1 except: break max_e = 0 max_i = [] for i in range(100): temp = max_e max_e = max(count[i], max_e) if temp == max_e and count[i] == max_e: max_i.append(i + 1) elif temp != max_e: max_i = [i + 1] for i in max_i: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,251
s623382439
p00028
u737311644
1517015361
Python
Python3
py
Accepted
20
5592
175
a = [] while True: try: a.append(int(input())) except:break c=[0]*101 for i in a: c[i] += 1 b=max(c) for j in range(100): if c[j]==b: print(j)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,252
s296583983
p00028
u043254318
1517177728
Python
Python3
py
Accepted
20
5600
348
def get_input(): while True: try: yield ''.join(input()) except EOFError: break N = list(get_input()) maxi = 0 nums = [0 for i in range(101)] for l in range(len(N)): k = int(N[l]) nums[int(N[l])] += 1 maxi = max(maxi, nums[k]) for i in range(101): if nums[i] == maxi: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,253
s095958758
p00028
u150984829
1517599931
Python
Python3
py
Accepted
20
5564
118
import sys a={} for i in sys.stdin: a.setdefault(i,0);a[i]+=1 for k in a: if a[k]==max(a.values()):print(k.strip())
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,254
s372860500
p00028
u150984829
1517599961
Python
Python3
py
Accepted
20
5564
116
import sys a={} for i in sys.stdin:a.setdefault(i,0);a[i]+=1 for k in a: if a[k]==max(a.values()):print(k.strip())
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,255
s470288996
p00028
u150984829
1517600019
Python
Python3
py
Accepted
20
5568
115
import sys a={} for i in sys.stdin:a.setdefault(i,0);a[i]+=1 [print(k.strip())for k in a if a[k]==max(a.values())]
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,256
s942431750
p00028
u150984829
1517600873
Python
Python3
py
Accepted
20
5604
98
import sys a=[0]*101 for i in sys.stdin:a[int(i)]+=1 [print(i)for i in range(101)if a[i]==max(a)]
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,257
s759844560
p00028
u401720175
1523449096
Python
Python3
py
Accepted
20
5604
273
# coding: utf-8 import sys d = {} for line in sys.stdin: s = line.strip() if not s in d: d[s] = 1 else: d[s] += 1 max_num = max(d.values()) ans = [int(key) for key, value in d.items() if value == max_num] for i in sorted(ans): print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,258
s287522899
p00028
u553148578
1523848058
Python
Python3
py
Accepted
20
5600
110
a=[0]*100 while 1: try: a[int(input())-1]+=1 except: break [print(i+1) for i in range(100) if a[i]==max(a)]
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,259
s827066964
p00028
u898097781
1525421484
Python
Python3
py
Accepted
20
6008
222
from collections import Counter import sys lines = [] for line in sys.stdin: lines.append(int(line.strip())) c = Counter(lines) m = c.most_common(1)[0][1] for k in sorted(c.keys()): if c[k]==m: print(k)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,260
s589265632
p00028
u724548524
1525855504
Python
Python3
py
Accepted
20
5600
279
import sys s ,v = [], [] for e in sys.stdin: try: v[s.index(int(e))] += 1 except: s.append(int(e)) v.append(1) c = list(zip(s, v)) c.sort() c.sort(key = lambda x: x[1], reverse = True) for i in c: if i[1] == c[0][1]:print(i[0]) else:break
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,261
s253198808
p00028
u136916346
1527397098
Python
Python3
py
Accepted
30
5996
191
import sys,collections l=[int(t) for t in sys.stdin] m=sorted(collections.Counter(l).values())[-1] [print(i[0]) for i in sorted(collections.Counter(l).items(),key=lambda x:x[0]) if i[1]==m]
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,262
s687617374
p00028
u352394527
1527451778
Python
Python3
py
Accepted
30
6004
281
from collections import Counter dic = Counter() while True: try: dic[int(input())] += 1 except EOFError: break lst = dic.most_common() max_value = lst[0][1] mode_values = [t[0] for t in lst if t[1] == max_value] mode_values.sort() for v in mode_values: print(v)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,263
s609689093
p00028
u847467233
1528893200
Python
Python3
py
Accepted
20
5600
229
# AOJ 0028 Mode Value # Python3 2018.6.13 bal4u import sys cnt = [0 for i in range(101)] max = 0 for _ in sys.stdin: i = int(_) cnt[i] += 1 if cnt[i] > max: max = cnt[i] for i in range(101): if cnt[i] == max: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,264
s491064945
p00028
u847467233
1528893882
Python
Python3
py
Accepted
20
5604
216
# AOJ 0028 Mode Value # Python3 2018.6.13 bal4u import sys cnt = [0]*101 while True: try: cnt[int(input())] += 1 except EOFError: break max = max(cnt) for i in range(101): if cnt[i] == max: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,265
s157955738
p00028
u575065019
1345578411
Python
Python
py
Accepted
10
4220
181
lst = [0]*100 while True: try: n = input() except EOFError: break lst[n-1] += 1 M = max(lst) for i in range(0,100): if lst[i] == M: print i+1
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,266
s734974584
p00028
u724947062
1347277982
Python
Python
py
Accepted
20
5396
363
import sys dictionary = dict() for line in sys.stdin.readlines(): line = line.strip() num = int(line) if not dictionary.has_key(num): dictionary[num] = 0 dictionary[num] += 1 lastValue = max(dictionary.values()) for key, value in sorted(dictionary.items(), key=lambda x: x[1], reverse=True): if value == lastValue: print key
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,267
s765710368
p00028
u735362704
1355407493
Python
Python
py
Accepted
20
5376
450
#!/usr/bin/env python # coding: utf-8 import sys import random def main(): lines = sys.stdin.readlines() nums = [int(line.replace("\n", "")) for line in lines if line != "\n"] num_set = [i for i in set(nums)] num_set.sort(lambda a, b: cmp(nums.count(a), nums.count(b))) maximum = nums.count(num_set[-1]) for num in num_set: if nums.count(num) == maximum: print num if __name__ == '__main__': main()
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,268
s091345527
p00028
u647766105
1355745585
Python
Python
py
Accepted
10
5052
151
import sys list=[0]*101 for line in sys.stdin.readlines(): list[int(line.strip())]+=1 ma=max(list) for i,v in enumerate(list): if v==ma:print i
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,269
s683502010
p00028
u419407022
1356271872
Python
Python
py
Accepted
20
4224
198
l = [] c = list([0] * 100) while True: try: c[int(raw_input()) - 1] += 1 except: break m = max(c) for i in xrange(c.count(m)): j = c.index(m) print j + 1 c[j] = 0
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,270
s328463403
p00028
u865312527
1359449236
Python
Python
py
Accepted
10
4224
232
import sys m={} for line in sys.stdin.readlines(): p=int(line.rstrip()) m.setdefault(p,0) m[p]+=1 x=sorted(m.items(),key=lambda x:x[1],reverse=True) tmp=x[0][1] ans=[v for v,k in x if tmp == k] for l in ans: print l
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,271
s529937911
p00028
u782850731
1362269974
Python
Python
py
Accepted
20
4656
485
from __future__ import (absolute_import, division, print_function, unicode_literals) from sys import stdin from collections import Counter from itertools import takewhile from operator import itemgetter counter = Counter() for line in stdin: if not line.split(): break counter[int(line)] += 1 v = counter.most_common(1)[0][1] mc = takewhile(lambda x: v == x[1], counter.most_common(100)) for n, _ in sorted(mc, key=itemgetter(0)): print(n)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,272
s174605183
p00028
u147801965
1365515758
Python
Python
py
Accepted
10
4224
231
a={} while True: try: t=input() a[t] = 0 if t not in a else a[t]+1 except EOFError: q=[j for i,j in enumerate(a) if a.values()[i] == max(a.values())] for i in sorted(q): print i break
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,273
s723019654
p00028
u542421762
1368266516
Python
Python
py
Accepted
10
4232
254
import sys h = {} for i in range(1, 101): h[i] = 0 #input_file = open(sys.argv[1], 'r') for line in sys.stdin: n = int(line) h[n] += 1 m = max(h.values()) for i in range(1, 101): if h[i] == m: print i else: pass
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,274
s454718634
p00028
u350508326
1368926252
Python
Python
py
Accepted
20
4224
378
list = [0] for i in range(100): list.append(0) m = 0 while True: try: a = int(raw_input()) list[a] += 1 #print a,list[a] if list[a] > m: m = list[a] except EOFError: break for i in range(100): if list[i] == m: print i
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,275
s512049873
p00028
u912237403
1378066009
Python
Python
py
Accepted
20
4216
171
d=[0 for i in range(101)] while True: try: n=input() d[n]+=1 except: break for e in [i for i,e in enumerate(d) if e==max(d)]: print e
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,276
s703680107
p00028
u912237403
1378066352
Python
Python
py
Accepted
10
4212
150
d=[0]*101 while True: try: n=input() d[n]+=1 except: break tmp=max(d) for i in range(101): if d[i]==tmp: print i
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,277
s464831900
p00028
u813384600
1380544222
Python
Python
py
Accepted
10
4228
265
a = {} while True: try: n = int(raw_input()) if n not in a: a[n] = 0 a[n] += 1 except EOFError: break a = sorted(a.items(), key=lambda x:x[1], reverse = True) for s in [k for k,v in a if v == a[0][1]]: print s
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,278
s348073828
p00028
u523886269
1381556334
Python
Python
py
Accepted
10
4232
404
import sys group = {} for line in sys.stdin: n = int(line) if n in group: group[n] += 1 else: group[n] = 1 sorted_group = sorted(group.items(), key=lambda x: x[1]) sorted_group.reverse() mx = 0 result = [] for k,v in sorted_group: if mx == 0: mx = v if v == mx: result.append(k) else: break result.sort() for i in result: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,279
s553332343
p00028
u633068244
1393394114
Python
Python
py
Accepted
10
4216
283
a = [] s=[0 for i in range(100)] while True: try: a.append(int(raw_input())) except: break for i in range(100): s[i] = a.count(i+1) mx = max(s) smx = [] for i in range(100): if s[i] == mx: smx.append(i+1) smx.sort() for i in smx: print i
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,280
s719964883
p00028
u912237403
1394315924
Python
Python
py
Accepted
10
4192
129
import sys n = 101 D = [0]*n for s in sys.stdin: D[int(s)] += 1 tmp = max(D) i = 0 for e in D: if e==tmp: print i i += 1
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,281
s927981434
p00028
u193025715
1395406380
Python
Python
py
Accepted
10
4236
459
nums = [] val = [] ans = [] while True: try: nums.append(int(raw_input())) except EOFError: num_list = sorted(list(set(nums))) for n in num_list: val.append(nums.count(n)) ans.append(num_list[val.index(max(val))]) tmp = max(val) val.remove(max(val)) num_list.pop(val.index(tmp)) while max(val) == tmp: ans.append(num_list[val.index(max(val))]) num_list.pop(val.index(tmp)) val.remove(max(val)) for s in ans: print s break
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,282
s888113474
p00028
u491763171
1396402918
Python
Python
py
Accepted
10
4612
250
from collections import Counter c = Counter() while 1: try: c[input()] += 1 except: break L = sorted(c.items(), key=lambda a:(-a[1], a[0])) mx = L[0][1] for x in L: if x[1] == mx: print x[0] else: break
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,283
s948355286
p00028
u246033265
1396620841
Python
Python
py
Accepted
10
4200
159
try: a = [0] * 101 while True: a[int(raw_input())] += 1 except: pass mx = max(a) for i in range(len(a)): if a[i] == mx: print i
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,284
s014539826
p00028
u378480414
1397106667
Python
Python
py
Accepted
10
4200
209
import sys count={} for line in sys.stdin.readlines(): n=int(line.rstrip()) if not count.has_key(n): count[n]=0 count[n]+=1 max=max(count.values()) for k,v in sorted(count.items()): if v==max: print k
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,285
s268862521
p00028
u436634575
1401170026
Python
Python3
py
Accepted
30
6720
169
import sys a = [] for line in sys.stdin: a.append(int(line)) d = [a.count(i) for i in range(1, 101)] m = max(d) for i in range(100): if d[i] == m: print(i + 1)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,286
s044775546
p00028
u506949161
1597761858
Python
Python3
py
Accepted
20
5600
212
a=[] try: while True: a.append(int(input())) except EOFError: pass counts=[0]*101 for n in a: counts[n] += 1 for n in range(len(a)): if counts[n] == max(counts): print(n)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,287
s864544780
p00028
u363460225
1597759200
Python
Python3
py
Accepted
30
5600
118
a=[0]*100 while True: try: a[int(input())]+=1 except: break for i in range(100): if a[i]==max(a): print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,288
s209652622
p00028
u365131854
1597757450
Python
Python3
py
Accepted
20
5596
136
n=[0]*101 while 1: try:n[int(input())]+=1 except:break m_n=max(n) for i in range(n.count(m_n)): print(n.index(m_n)+i) n.remove(m_n)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,289
s540879936
p00028
u082412851
1597725133
Python
Python3
py
Accepted
20
5596
196
a=[] while True: try: a.append(int(input())) except: break count=[0]*101 for i in a: count[i]+=1 for i in range (len(a)): if count[i]==max(count): print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,290
s097293357
p00028
u852547520
1597723542
Python
Python3
py
Accepted
20
5592
208
a=[] try: while True: a.append(int(input())) except EOFError: pass counts=[0]*101 for n in a: counts[n]+=1 for n in range(len(a)): if counts[n] == max(counts): print(n)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,291
s242289961
p00028
u427834127
1597715024
Python
Python3
py
Accepted
20
5596
185
a=list([0]*100) while True: try: a[int(input())-1] += 1 except EOFError: break x = max(a) for i in range(100): if a[i]==x: print(i+1)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,292
s067343302
p00028
u064625546
1597709794
Python
Python3
py
Accepted
20
5592
163
s=[0]*101 i=0 try: while True: n=int(input()) s[n]+=1 except EOFError: pass for i in range(len(s)): if s[i]==max(s): print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,293
s852266282
p00028
u476754031
1597681597
Python
Python3
py
Accepted
20
5600
236
import sys num_max = 0 frequency = [0] * 101 for line in sys.stdin: num = int(line) frequency[num] += 1 num_max = max(num_max, frequency[num]) for i in range(len(frequency)): if num_max == frequency[i]: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,294
s055950060
p00028
u782152619
1597676581
Python
Python3
py
Accepted
20
5592
196
a=[] while True: try: a.append(int(input())) except: break count=[0]*101 for i in a: count[i]+=1 for i in range (len(a)): if count[i]==max(count): print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,295
s336163729
p00028
u799076010
1597673988
Python
Python3
py
Accepted
20
5600
151
a=[0]*100 while True: try: a[int(input())-1]+=1 except: break b=max(a) for i in range(100): if a[i]==b: print(i+1)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,296
s968345565
p00028
u259416836
1597670197
Python
Python3
py
Accepted
20
5592
201
a=0 b=[] while True: try: n=int(input()) b.append(n) except: break c=[0]*101 for i in b: c[i]+=1 d = max(c) for k in range(100): if c[k]==d: print(k)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,297
s739593392
p00028
u762022668
1597669746
Python
Python3
py
Accepted
20
5596
112
a=[0]*100 while 1: try:a[int(input())-1]+=1 except:break [print(i+1)for i in range(100)if a[i]==max(a)]
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,298
s821315292
p00028
u430159711
1597666078
Python
Python3
py
Accepted
30
5996
271
import sys a=[] for i in sys.stdin: a.append(int(i)) import collections counted = collections.Counter(a) m = max(counted.values()) chars = [key for key, value in counted.items() if value == m] x=sorted(chars) [print(i) for i in x]
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,299
s052521914
p00028
u326077502
1597635474
Python
Python3
py
Accepted
20
5592
168
a = [0]*101 while True: try: a[int(input())] += 1 except EOFError: break k = max(a) for i in range(100): if a[i] == k: print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,300
s866370946
p00028
u257570657
1597628606
Python
Python3
py
Accepted
20
5600
188
a,c=[],[0]*101 while True: try: a.append(int(input())) except EOFError: break for i in a: c[i]+=1 for i in range(len(a)): if c[i]==max(c): print(i)
p00028
<h1>Mode Value</h1> <p> Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently. </p> <H2>Input</H2> <p> A sequence of integers <var>a<sub>i</sub></var> (1 &le; <var>a<sub>i</sub></var> &le; 100). The number of integers is less than or equals to 100. </p> <H2>Output</H2> <p> Print the mode values. If there are several mode values, print them in ascending order. </p> <H2>Sample Input</H2> <pre> 5 6 3 5 8 7 5 3 9 7 3 4 </pre> <H2>Output for the Sample Input</H2> <pre> 3 5 </pre> <p> For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5. </p>
5 6 3 5 8 7 5 3 9 7 3 4
3 5
8,301