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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s704582456 | p00028 | u705625724 | 1590384375 | Python | Python3 | py | Accepted | 30 | 6004 | 425 | # coding: utf-8
# 50
import collections
S = list()
for i in range(100):
try:
S.append(int(input()))
except:
break
A = list()
for j in range(len(collections.Counter(S).most_common())):
if collections.Counter(S).most_common()[0][1] == collections.Counter(S).most_common()[j][1]:
A.ap... | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,402 |
s220940335 | p00028 | u192469946 | 1590384211 | Python | Python3 | py | Accepted | 30 | 6004 | 495 | #0028
import collections
a = list()
for i in range(100):
try:
a.append(int(input()))
except:
break
x = collections.Counter(a).most_common()[0][1]
z = collections.Counter(a).most_common()[0][0]
l = []
for j in range(len(collections.Counter(a).most_common())):
y = collections.Counter(a).most... | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,403 |
s427528530 | p00028 | u290304811 | 1589964218 | Python | Python3 | py | Accepted | 20 | 5600 | 181 |
a = [0]*101
while True:
try:
n = int(input())
a[n] += 1
except:
break
for i in range(1,101):
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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,404 |
s503047563 | p00028 | u395654950 | 1589788596 | Python | Python3 | py | Accepted | 20 | 5596 | 211 | # coding: utf-8
# Your code here!
l = [0] * 110
while True:
try:
n = int(input())
l[n] += 1
except EOFError:
break
m = max(l)
for i in range(1, 101):
if l[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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,405 |
s454297907 | p00028 | u747915832 | 1589734452 | Python | Python3 | py | Accepted | 20 | 5600 | 770 | while True:
try:
alist = []
while True:
try:
a = int(input())
alist.append(a)
except:
break
m = min(alist)
M = max(alist)
if m<1:
break
clist = [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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,406 |
s606015401 | p00028 | u260980560 | 1589610192 | Python | Python3 | py | Accepted | 20 | 5604 | 327 | import sys
readlines = sys.stdin.readlines
write = sys.stdout.write
def solve():
mp = {}
for line in readlines():
v = int(line)
mp[v] = mp.get(v, 0) + 1
ma = max(mp.values())
ans = [k for k, v in mp.items() if v == ma]
ans.sort()
write("\n".join(map(str, ans)))
write("\n")
so... | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,407 |
s520797781 | p00028 | u583329397 | 1589535976 | Python | Python3 | py | Accepted | 20 | 5592 | 116 | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,408 |
s592896653 | p00028 | u814278309 | 1589465750 | Python | Python3 | py | Accepted | 20 | 5592 | 156 | a = [0] * 101
while 1:
try:
a[int(input())] += 1
except:
break
m = max(a)
for i, v in enumerate(a):
if m == 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,409 |
s988992660 | p00028 | u240091169 | 1589026307 | Python | Python3 | py | Accepted | 20 | 5592 | 187 | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,410 |
s166596209 | p00028 | u014861569 | 1588529468 | Python | Python3 | py | Accepted | 20 | 5592 | 247 | y=[0]*100
while True:
try:
y[int(input())-1]+=1
except:
break
flag=False
for i in range(100)[::-1]:
if flag:
exit()
for j in range(100):
if y[j]==i:
flag=True
print(j+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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,411 |
s251699395 | p00028 | u177415284 | 1588139927 | Python | Python3 | py | Accepted | 20 | 5596 | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,412 |
s858441114 | p00028 | u544050664 | 1588138683 | Python | Python3 | py | Accepted | 20 | 5596 | 250 | mode = []
count = [0 for i in range(100)]
while(1):
try:
n = int(input())
count[n-1] = count[n-1] + 1
except EOFError:
max_ = max(count)
for i in range(100):
if count[i] == max_:
mode.append(i+1)
for i in mode:
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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,413 |
s618808170 | p00028 | u037441960 | 1588082035 | Python | Python3 | py | Accepted | 20 | 5600 | 276 | N = []
A = [0 for i in range(100)]
while True :
try :
n = int(input())
N.append(n)
A[n - 1] += 1
except :
break
m = max(A)
M = [i for i, x in enumerate(A) if x == m]
l = len(M)
for i in range(l) :
print(M[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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,414 |
s906605532 | p00028 | u808372529 | 1584066484 | Python | Python3 | py | Accepted | 20 | 5604 | 118 | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,415 |
s334643713 | p00028 | u630911389 | 1576979716 | Python | Python3 | py | Accepted | 30 | 5596 | 209 | # 100まで
cnt = [0] * 101
while True:
try:
index = int(input())
cnt[index] += 1
except EOFError:
break
max = max(cnt)
for i in range(100):
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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,416 |
s008110835 | p00028 | u153447291 | 1576903745 | Python | Python3 | py | Accepted | 30 | 5600 | 401 | num = [[0,i+1] for i in range(100)]
while True:
try:
num[int(input())-1][0] += 1
except:
num.sort(reverse = True)
ans = []
for i in range(100):
if num[i][0] == num[0][0]:
ans.append(num[i][1])
else:
ans.sort()
... | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,417 |
s015281827 | p00028 | u803862921 | 1570872074 | Python | Python3 | py | Accepted | 20 | 5600 | 187 |
L = [0] * 101
while True:
try:
k = int(input())
L[k] += 1
except EOFError:
break
max = max(L)
for i in range(101):
if L[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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,418 |
s973228088 | p00028 | u472768263 | 1570707342 | Python | Python3 | py | Accepted | 20 | 5596 | 349 | list=[]
while True:
try:
x=int(input())
except:
break
list.append(x)
tmp=1
ans=[]
for i in range(100):
num=0
for l in range(len(list)):
if i==list[l]:
num+=1
if num>tmp:
tmp=num
ans=[i]
elif num==tmp:
ans.append(i)
for n in range(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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,419 |
s095147073 | p00028 | u824708460 | 1566300188 | Python | Python3 | py | Accepted | 20 | 5596 | 170 | a = [0] * 100
while 1:
try:
n = int(input())
a[n] += 1
except:
break
v = max(a)
for i in range(100):
if v == a[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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,420 |
s124686139 | p00028 | u668489394 | 1565337592 | Python | Python3 | py | Accepted | 20 | 5600 | 221 | import sys
arr = []
for i in range(101):
arr.append(0)
maxi = 0
for e in sys.stdin:
arr[int(e)] += 1
maxi = max(maxi, arr[int(e)])
for i in range(101):
if arr[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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,421 |
s409503682 | p00028 | u821561321 | 1564929183 | Python | Python3 | py | Accepted | 20 | 5596 | 118 | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,422 |
s766170304 | p00028 | u939401108 | 1564926471 | Python | Python3 | py | Accepted | 20 | 5604 | 122 | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,423 |
s866816899 | p00028 | u427219397 | 1564893008 | Python | Python3 | py | Accepted | 20 | 5592 | 185 | list=[0]*100
while(True):
try:
list[int(input())-1]+=1
except:
for i in range(100):
if list[i]==max(list):
print(i+1)
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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,424 |
s278791951 | p00028 | u212392281 | 1564880843 | Python | Python3 | py | Accepted | 20 | 5596 | 188 | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,425 |
s359749311 | p00028 | u678843586 | 1564717306 | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,426 |
s817715789 | p00028 | u804558166 | 1564369183 | Python | Python3 | py | Accepted | 20 | 5600 | 116 | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,427 |
s128642751 | p00028 | u313600138 | 1564072423 | Python | Python3 | py | Accepted | 20 | 5596 | 165 | import sys
cnt = [0]*101
while True:
try:
cnt[int(input())] +=1
except EOFError:
break
m = max(cnt)
for i in range(101):
if cnt[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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,428 |
s216958911 | p00028 | u090921599 | 1563774618 | Python | Python3 | py | Accepted | 20 | 5600 | 189 | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,429 |
s812969399 | p00028 | u264450287 | 1563167866 | Python | Python3 | py | Accepted | 30 | 5592 | 367 | A=[]
B=[]
C=[]
while True:
try:
A.append(int(input()))
except EOFError:
break
for i in range(len(A)):
count=0
for j in range(len(A)):
if A[i]==A[j]:
count+=1
B.append(count)
maxb=max(B)
for i in range(len(A)):
if B[i]==maxb:
if A[i] in C:
pass
else:
C.append(A[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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,430 |
s494461590 | p00028 | u314166831 | 1561994634 | Python | Python3 | py | Accepted | 30 | 5676 | 2,174 | # coding=utf-8
###
### for atcorder program
###
import sys
import math
# math class
class mymath:
### pi
pi = 3.14159265358979323846264338
### Prime Number
def pnum_eratosthenes(self, n):
ptable = [0 for i in range(n+1)]
plist = []
for i in range(2, n+1):
if ptab... | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,431 |
s282476537 | p00028 | u548252256 | 1560259716 | Python | Python3 | py | Accepted | 20 | 5600 | 295 | if __name__ == '__main__':
ans = dict()
while True:
try:
n = int(input())
if n not in ans:
ans[n] = 1
else:
ans[n] += 1
except EOFError:
break
a = max(ans.values())
A = []
for d in ans:
if ans[d] == a:
A.append(d)
B = sorted(A)
for i in B:
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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,432 |
s524416896 | p00028 | u506537276 | 1560150519 | Python | Python3 | py | Accepted | 20 | 5596 | 214 | a = [0 for i in range(101)]
while True:
try:
n = int(input())
a[n] += 1
except EOFError:
break
m = 0
for i in range(1, 101):
m = max(m, a[i])
for i in range(1, 101):
if a[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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,433 |
s673727265 | p00028 | u625806423 | 1557143025 | Python | Python3 | py | Accepted | 20 | 5604 | 218 | data = [0 for _ in range(100)]
while True:
try:
input_data = int(input())
except EOFError:
break
data[input_data-1] += 1
max_piv = max(data)
for i in range(100):
if data[i] == max_piv:
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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,434 |
s768791605 | p00028 | u406093358 | 1555548376 | Python | Python | py | Accepted | 10 | 4644 | 244 | import sys
counter = []
for i in range(0, 101):
counter.append(0)
for line in sys.stdin:
counter[int(line)] += 1
max = 0
for i in range(0, 101):
if max < counter[i]: max = counter[i]
for i in range(0, 101):
if max == 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,435 |
s525868452 | p00028 | u998437062 | 1554712817 | Python | Python3 | py | Accepted | 20 | 5592 | 260 |
a = [0] * 100
while True:
try:
a[int(input()) - 1] += 1
except:
break
flag = False
for i in range(100)[::-1]:
if flag:
exit()
for j in range(100):
if a[j] == i:
flag = True
print(j + 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,436 |
s958641836 | p00028 | u350155409 | 1554016469 | Python | Python3 | py | Accepted | 20 | 5596 | 318 | import sys
freq = {}
for s in sys.stdin:
n = int(s.strip())
if n not in freq:
freq[n] = 1
else:
freq[n] += 1
sortedfreq = sorted(freq.items(), key=lambda x:-x[1])
modes = sorted(filter(lambda x: x[1] == sortedfreq[0][1], sortedfreq), key=lambda x:x[0])
for i in modes:
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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,437 |
s460259923 | p00028 | u990228206 | 1553161386 | Python | Python3 | py | Accepted | 20 | 5592 | 148 | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,438 |
s903102237 | p00028 | u563075864 | 1543032483 | Python | Python3 | py | Accepted | 20 | 5604 | 250 | mode = []
count = [0 for i in range(100)]
while(1):
try:
n = int(input())
count[n-1] = count[n-1] + 1
except EOFError:
max_ = max(count)
for i in range(100):
if count[i] == max_:
mode.append(i+1)
for i in mode:
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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,439 |
s688511108 | p00028 | u067299340 | 1542262411 | Python | Python3 | py | Accepted | 20 | 5596 | 394 | count_map = {}
while True:
try:
i = int(input())
if i in count_map:
count_map[i] += 1
else:
count_map[i] = 1
except EOFError:
break
max_count = max(count_map.values())
mode_values = []
for item in count_map.items():
if item[1] == max_count:
mod... | 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,440 |
s329606981 | p00028 | u717526540 | 1541725035 | Python | Python3 | py | Accepted | 30 | 6004 | 356 | import collections
alist = []
while(1):
try:
a = int(input())
except:
break
alist.append(a)
ac = collections.Counter(alist)
cnt = 0
while(1):
print(ac.most_common()[cnt][0])
if cnt == len(alist):
break
if ac.most_common()[cnt][1] == ac.most_common()[cnt+1][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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,441 |
s740507130 | p00028 | u219940997 | 1537458946 | Python | Python3 | py | Accepted | 30 | 5600 | 205 | import sys
count = [0 for _ in range(101)]
mode = 0
for s in sys.stdin:
x = int(s)
count[x] += 1
mode = max(mode, count[x])
for i in range(101):
if count[i] == mode:
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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,442 |
s056422254 | p00028 | u252700163 | 1537220772 | Python | Python3 | py | Accepted | 20 | 5604 | 333 | import sys
i_f = {}
for line in sys.stdin:
v = int(line)
if i_f.get(v) is None:
i_f[v] = 0
i_f[v] += 1
ans = {}
for i, f in i_f.items():
if ans.get(f) is None:
ans[f] = []
ans[f].append(i)
ans = [ (a,vs) for a, vs in ans.items() ]
ans = max(ans, key=lambda x:x[0])
#print(ans)
for i in sorted(ans[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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,443 |
s934525208 | p00028 | u319725914 | 1534293246 | Python | Python3 | py | Accepted | 30 | 6008 | 235 | from collections import Counter
a = []
while(True):
try:
a.append(int(input()))
except:
c = Counter(a)
d = c.most_common()
print("\n".join(str(e[0]) for e in d if e[1] == d[0][1]))
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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,444 |
s168656042 | p00028 | u079141094 | 1517380907 | Python | Python3 | py | Accepted | 20 | 5608 | 249 | import sys
def solve():
A = [0 for _ in range(101)]
for i in sys.stdin:
a = int(i)
A[a] += 1
M = max(A)
for i, a in enumerate(A):
if a == M:
print(i)
if __name__ == "__main__":
solve()
| 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 ≤ <var>a<sub>i</sub></var> ≤ 100). The numb... | 5
6
3
5
8
7
5
3
9
7
3
4
| 3
5
| 8,445 |
s986918406 | p00029 | u471400255 | 1530976569 | Python | Python3 | py | Accepted | 30 | 5968 | 146 | from collections import Counter
s = input().split()
po = Counter(s)
s.sort(reverse=True,key=lambda x:len(x))
print(po.most_common()[0][0],s[0])
| p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,446 |
s319878285 | p00029 | u525366883 | 1535623674 | Python | Python | py | Accepted | 0 | 4640 | 281 | # coding: utf-8
# Your code here!
a = raw_input().lower()
a = " "+a+" "
s = a.split()
ss = ""
tmp = ""
n = 0
for i in s:
if len(ss) < len(i):
ss = i
for i in s:
i = " " + i + " "
if a.count(i) > n:
n = a.count(i)
tmp = i.strip()
print tmp, ss
| p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,447 |
s573857725 | p00029 | u888548672 | 1555897206 | Python | Python3 | py | Accepted | 20 | 5564 | 192 | li = input().split()
m = (li[0], 0)
l = (li[0], len(li[0]))
for s in set(li):
if li.count(s) > m[1]: m = (s, li.count(s))
if l[1] < len(s): l = (s, len(s))
print(m[0], l[0])
| p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,448 |
s543971938 | p00029 | u647694976 | 1556080991 | Python | Python3 | py | Accepted | 20 | 5556 | 331 | ns=list(map(str,input().split()))
mp={}
for n in ns:
if n in mp:
mp[n] +=1
else:
mp[n]=1
long_word=""
freq_word=""
max_len=0
max_fre=0
for k,v in mp.items():
if max_len<len(k):
max_len=len(k)
long_word=k
if max_fre<v:
max_fre=v
fre_word=k
print(fre_word, l... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,449 |
s982644384 | p00029 | u647694976 | 1556080991 | Python | Python3 | py | Accepted | 20 | 5560 | 331 | ns=list(map(str,input().split()))
mp={}
for n in ns:
if n in mp:
mp[n] +=1
else:
mp[n]=1
long_word=""
freq_word=""
max_len=0
max_fre=0
for k,v in mp.items():
if max_len<len(k):
max_len=len(k)
long_word=k
if max_fre<v:
max_fre=v
fre_word=k
print(fre_word, l... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,450 |
s086206917 | p00029 | u560838141 | 1408860129 | Python | Python | py | Accepted | 10 | 4208 | 207 |
words = raw_input().strip().split(" ")
count = {};
for word in words:
s = count.setdefault(word, 0);
count[word] = s + 1
print max(count.items(), key=lambda x: x[1])[0], max(words, key=lambda x: len(x)) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,451 |
s161677637 | p00029 | u579833671 | 1410774010 | Python | Python | py | Accepted | 20 | 4236 | 389 | s = raw_input().split()
maxLength = 0
word1 = ""
word2 = ""
count = {}
maxCount = 0
for i in range(len(s)):
count[s[i]] = 0
for i in range(len(s)):
count[s[i]] += 1
if(len(s[i]) > maxLength):
maxLength = len(s[i])
word2 = s[i]
for i in range(len(s)):
if(count[s[i]] > maxCount):
m... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,452 |
s423754575 | p00029 | u506132575 | 1416188355 | Python | Python | py | Accepted | 10 | 4248 | 461 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
a = raw_input()
b = a.split()
c = [ i.lower() for i in b ]
e = {}
h = {}
for d in c:
if d not in e:
h[d] = len(d)
e[d] = 1
else:
e[d] += 1
f = [ (v,k) for k,v in e.items() ]
f.sort()
f.reverse()
maxnum = f[0][0]
for g in f:
if g[0] != maxnum:
break
... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,453 |
s169920017 | p00029 | u846356981 | 1418867781 | Python | Python3 | py | Accepted | 30 | 6720 | 368 | # coding: utf-8
# Here your code !
l = input().split()
len_m = 0
for e in l:
if len_m < len(e):
len_m = len(e)
a1 = e
d = {}
for e in l:
if e not in d:
d.update({
e: 1
})
else:
t = d[e]
d.update({
e: (t+1)
})
print('%s %... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,454 |
s431469173 | p00029 | u567380442 | 1423027863 | Python | Python3 | py | Accepted | 30 | 6740 | 183 | import collections
c = collections.Counter(input().split())
longest = ''
for word in c:
if len(longest) < len(word):
longest = word
print(c.most_common(1)[0][0], longest) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,455 |
s726399015 | p00029 | u879226672 | 1424779523 | Python | Python | py | Accepted | 20 | 4232 | 554 |
wordlist = []
wordlist = raw_input().split()
dic = {}
longest = ['',0]
m = 0
for word in wordlist:
# mode
if word not in dic:
dic[word] = 1
else:
dic[word] += 1
# word_length
if m == 0:
longest[0] = word
longest[1] = len(word)
m += 1
... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,456 |
s817575084 | p00029 | u540744789 | 1426611238 | Python | Python | py | Accepted | 20 | 4224 | 351 | L=raw_input().split(" ")
count={}
length={}
while len(L)!=0:
word=L.pop(0).lower()
if word in count:
count[word]+=1
else:
count[word]=1
length[word]=len(word)
most=max(count.values())
long=max(length.values())
print [k1 for k1 in count if count[k1]==most].pop(0),
print [k2 for k2 in len... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,457 |
s624735456 | p00029 | u145563629 | 1429613949 | Python | Python | py | Accepted | 10 | 4216 | 288 |
while 1:
try:
ls = raw_input().split()
dic = {}
for word in ls:
dic[word] = dic.get(word,0) + 1
max1 = sorted(dic.items(), key=lambda x:x[1], reverse=True)
max2 = ""
for i in ls:
if len(max2) < len(i):
max2 = i
print max1[0][0] + " " + max2
except:
exit() | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,458 |
s760426593 | p00029 | u067299340 | 1433155583 | Python | Python | py | Accepted | 10 | 4196 | 119 | s=raw_input().split()
c={}
for l in s:c[l]=c.get(l,0)+1
print sorted(c.items(),key=lambda x:x[1])[-1][0],max(s,key=len) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,459 |
s831742390 | p00029 | u873482706 | 1434592711 | Python | Python | py | Accepted | 10 | 4220 | 399 | string_lis = raw_input().split()
dic = {}
max_len = ''
for string in string_lis:
if not string in dic:
dic[string] = 1
else:
dic[string] = dic[string] + 1
if len(max_len) == 0:
max_len = string
elif len(max_len) < len(string):
max_len = string
max_count = sorted... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,460 |
s600898868 | p00029 | u534550471 | 1434606152 | Python | Python | py | Accepted | 10 | 4676 | 263 | import sys
import math
from collections import Counter
l = raw_input().split()
c = Counter()
for i in l:
c[i] += 1
cc = c.most_common(1)
ans = l[0]
for i in range(len(l)):
if len(l[i]) > len(ans):
ans = l[i]
print "{0} {1}".format(cc[0][0], ans) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,461 |
s488506623 | p00029 | u379956761 | 1435390616 | Python | Python3 | py | Accepted | 30 | 6720 | 432 | words = list(map(str, input().strip().split()))
lenAndWords = [0, '']
modeWords = {}
mode = [0, '']
for s in words:
if len(s) > lenAndWords[0]:
lenAndWords[0] = len(s)
lenAndWords[1] = s
if not s in modeWords:
d = {s:0}
modeWords.update(d)
else:
modeWords[s] += 1
... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,462 |
s329470463 | p00029 | u472944603 | 1437709075 | Python | Python | py | Accepted | 20 | 4232 | 488 | S = raw_input().split()
maxi = 0
for s in S:
length = len(s)
if (length > maxi):
maxi = length
maxs = s
S.sort()
i = 0
maxm = 0
mode = 0
while (i < len(S) - 1):
cnt = 1
while True:
if (S[i] == S[i + 1]):
i += 1
cnt += 1
if (i >= len(S) - 1):
... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,463 |
s270906239 | p00029 | u140201022 | 1444546734 | Python | Python | py | Accepted | 10 | 6224 | 238 | l=map(str,raw_input().split())
cnt={}
w=ans=""
for i in l:
if len(i)>len(w):
w=i
if cnt.has_key(i):
cnt[i]+=1
else:
cnt[i]=1
t=0
for i in cnt:
if cnt[i]>t:
t=cnt[i]
ans=i
print ans,w | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,464 |
s901297713 | p00029 | u071010747 | 1445340272 | Python | Python3 | py | Accepted | 20 | 7384 | 852 | # -*- coding:utf-8 -*-
def main():
LIST=[]
while True:
try:
val=input().split()
LIST=[]
for v in val:
flag=True
for item in LIST:
if item[0]==v:
index=LIST.index(it... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,465 |
s136888325 | p00029 | u011621222 | 1445644095 | Python | Python3 | py | Accepted | 20 | 7340 | 368 | x=input().split()
longestWord= ""
mostWord=0
currentCount=0
THEmostWord=""
for r in range (len(x)):
if len(x[r])> len(longestWord):
longestWord=x[r]
for j in range (len(x)):
thing= x[j]
currentCount=x.count(thing)
if currentCount > mostWord:
mostWord= currentCount
THEmostWord=... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,466 |
s186215806 | p00029 | u775586391 | 1448350417 | Python | Python3 | py | Accepted | 30 | 7352 | 188 | s = input().split()
max_c = 0
max_l = 0
c = ''
l = ''
for i in s:
if s.count(i) > max_c:
max_c = s.count(i)
c = i
if len(i) > max_l:
max_l = len(i)
l = i
print(c+' '+l) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,467 |
s406419404 | p00029 | u560214129 | 1450497742 | Python | Python3 | py | Accepted | 30 | 7348 | 379 | sentence=input()
list=[]
list=sentence.split()
c=[]
k=0
l=0
for i in range(len(list)):
c.append(0)
m=len(list[i])
if(m>k):
k=len(list[i])
max=list[i]
for i in range(len(list)):
for j in range(len(list)):
if(i!=j and list[i]==list[j]):
c[i]=c[i]+1
for i in range(len(c)... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,468 |
s432277754 | p00029 | u231562319 | 1454848610 | Python | Python3 | py | Accepted | 30 | 7292 | 305 | s=input()
a=s.split(" ")
mp={}
freq=""
longest=""
mx=0
for v in a:
#???????????°????????????
if v in mp:
mp[v]+=1
else:
mp[v]=1
if mx<mp[v]:
freq=v
mx=mp[v]
#?????????????????´??°
if len(longest)<len(v):
longest=v
print(freq,longest) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,469 |
s307672575 | p00029 | u075836834 | 1458328065 | Python | Python3 | py | Accepted | 30 | 7428 | 307 | A=list(map(str,input().split()))
#print(A)
max_length=0
maximum_number_of_letters=""
max_cnt=0
frequent_word=""
for i in A:
if len(i)>max_length:
maximum_number_of_letters=i
max_length=len(i)
if A.count(i)>max_cnt:
frequent_word=i
max_cnt=A.count(i)
print(frequent_word,maximum_number_of_letters) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,470 |
s540902925 | p00029 | u994049982 | 1458692474 | Python | Python | py | Accepted | 10 | 6228 | 171 | a=str(raw_input()).split(" ")
b=set(a)
c,d=[0,""],""
for i in b:
if len(i)>len(d): d=i
if a.count(i)>c[0]:
c[1]=i
c[0]=a.count(i)
print(c[1]+" "+d) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,471 |
s639263893 | p00029 | u650459696 | 1458986299 | Python | Python3 | py | Accepted | 20 | 7480 | 123 | s = list(input().split())
a = [s.count(i) for i in s]
l = [len(i) for i in s]
print(s[a.index(max(a))], s[l.index(max(l))]) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,472 |
s452017183 | p00029 | u650459696 | 1458986418 | Python | Python3 | py | Accepted | 50 | 7476 | 117 | s = input().split()
a = [s.count(i) for i in s]
l = [len(i) for i in s]
print(s[a.index(max(a))], s[l.index(max(l))]) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,473 |
s379018076 | p00029 | u148101999 | 1459392283 | Python | Python | py | Accepted | 10 | 6260 | 345 | s = raw_input().split()
maxLength, maxCount = 0, 0
word1, word2, count = "", "", {}
for i in range(len(s)):
count[s[i]] = 0
for i in range(len(s)):
count[s[i]] += 1
if(len(s[i]) > maxLength):
maxLength = len(s[i])
word2 = s[i]
for i in range(len(s)):
if(count[s[i]] > maxCount):
maxCount = count[s[i]]
word1 ... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,474 |
s501734855 | p00029 | u130979865 | 1460134989 | Python | Python | py | Accepted | 10 | 6464 | 401 | # -*- coding: utf-8 -*-
import sys
dic = {}
text = raw_input().split()
max_count = 0
max_length = 0
for i in text:
if i not in dic:
dic[i] = 1
else:
dic[i] += 1
for i in dic:
max_count = max(max_count, dic[i])
max_length = max(max_length, len(i))
for i in dic:
if max_count == dic[i... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,475 |
s149569007 | p00029 | u572790226 | 1460639636 | Python | Python3 | py | Accepted | 20 | 7404 | 221 | S = input()
W = S.split()
ws = {}
for w in W:
if not w in ws:
ws[w] = [1, len(w)]
else:
ws[w][0] += 1
print(max(ws.items(), key = lambda x: x[1][0])[0], max(ws.items(), key = lambda x: x[1][1])[0]) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,476 |
s366322162 | p00029 | u894114233 | 1463046002 | Python | Python | py | Accepted | 10 | 6320 | 178 | s=raw_input().split()
maxlen=""
maxct=0
for i in s:
if len(maxlen)<len(i):
maxlen=i
if maxct<s.count(i):
maxct=s.count(i)
maxm=i
print maxm,maxlen | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,477 |
s552771989 | p00029 | u957021485 | 1465643594 | Python | Python3 | py | Accepted | 30 | 7336 | 148 | st = input().split()
a = ""
b = {}
for s in st:
if len(s) > len(a): a = s
b[s] = b.get(s, 0) + 1
ls = sorted(b, key=b.get)[-1]
print(ls, a) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,478 |
s342216741 | p00029 | u203261375 | 1466918436 | Python | Python3 | py | Accepted | 30 | 7404 | 219 | str = input().split()
mfw = ""
mlw = ""
maxF = 0
maxL = 0
for w in str:
if str.count(w) > maxF:
mfw = w
maxF = str.count(w)
if len(w) > maxL:
mlw = w
maxL = len(w)
print(mfw, mlw) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,479 |
s066510785 | p00029 | u766477342 | 1468452759 | Python | Python3 | py | Accepted | 30 | 7600 | 213 | from collections import Counter
max_len = None
l = 0
counter = Counter(input().split())
for ci in counter:
if l < len(ci):
max_len = ci
l = len(ci)
print(counter.most_common(1)[0][0], max_len) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,480 |
s045143891 | p00029 | u300946041 | 1469183765 | Python | Python3 | py | Accepted | 30 | 7748 | 334 | # -*- coding: utf-8 -*-
from collections import defaultdict
d = defaultdict(int)
_input = input()
for word in _input.split():
d[word] += 1
times = sorted(d.items(), key=lambda item: item[1], reverse=True)
lengths = sorted(d.items(), key=lambda item: len(item[0]), reverse=True)
print(times[0][0], end=' ')
print(... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,481 |
s226760407 | p00029 | u896025703 | 1469756911 | Python | Python3 | py | Accepted | 20 | 7432 | 256 | l = input().split()
#print(l.count("your"))
hindo_max = 0
len_max = 0
for word in l:
if hindo_max < l.count(word):
hindo_max = l.count(word)
hindo_word = word
if len_max < len(word):
len_max = len(word)
len_word = word
print(hindo_word, len_word) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,482 |
s556061271 | p00029 | u358919705 | 1471993891 | Python | Python3 | py | Accepted | 30 | 7356 | 96 | words = input().split(' ')
print(sorted(words, key=words.count)[-1], sorted(words, key=len)[-1]) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,483 |
s658873792 | p00029 | u358919705 | 1471994011 | Python | Python3 | py | Accepted | 20 | 7252 | 79 | words = input().split()
print(max(words, key=words.count), max(words, key=len)) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,484 |
s430956677 | p00029 | u358919705 | 1471994129 | Python | Python3 | py | Accepted | 30 | 7452 | 58 | w=input().split()
print(max(w,key=w.count),max(w,key=len)) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,485 |
s957944925 | p00029 | u379499530 | 1473151938 | Python | Python | py | Accepted | 10 | 6244 | 147 | w = raw_input().split()
c, n = [], []
for i in w:
c.append(w.count(i))
n.append(len(i))
print w[c.index(max(c))] + " " + w[n.index(max(n))] | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,486 |
s846666308 | p00029 | u798803522 | 1473440293 | Python | Python3 | py | Accepted | 40 | 7368 | 312 | targ = input().split(' ')
mostfre = {}
ansfre = ""
longest = [0,""]
for t in targ:
if len(t) > longest[0]:
longest[0],longest[1] = len(t),t
mostfre[t] = mostfre.get(t,0) + 1
temp = 0
for k,v in mostfre.items():
if v > temp:
temp = v
ansfre = k
print(ansfre + ' ' + longest[1]) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,487 |
s841606831 | p00029 | u922871577 | 1479444004 | Python | Python | py | Accepted | 10 | 6240 | 224 | d = {}
m = 0
mw = ''
for w in raw_input().lower().split():
if w in d:
d[w] += 1
else:
d[w] = 1
if len(w) > m:
m = len(w)
mw = w
print max(d.keys(), key=lambda x:d[x]), mw
| p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,488 |
s375209999 | p00029 | u777299405 | 1480057595 | Python | Python3 | py | Accepted | 30 | 7320 | 75 | text = input().split()
print(max(text, key=text.count), max(text, key=len)) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,489 |
s227261879 | p00029 | u186082958 | 1480434638 | Python | Python3 | py | Accepted | 20 | 7356 | 287 | ns=list(map(str,input().split()))
mp={}
for n in ns:
if n in mp:
mp[n]=mp[n]+1
else:
mp[n]=1
long_word=''
freq_word=''
max_len=0
max_fre=0
for k,v in mp.items():
if max_len<len(k):
long_word=k
max_len=len(k)
if max_fre<v:
freq_word=k
max_fre=v
print(freq_word,long_word) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,490 |
s381588251 | p00029 | u301729341 | 1481126372 | Python | Python3 | py | Accepted | 20 | 7392 | 266 | date = list(map(str,input().split()))
Num = 0
Size = 0
for tag in sorted(set(date), key=date.index):
if date.count(tag) > Num:
Num = date.count(tag)
Ooi = tag
if len(tag) > Size:
Size = len(tag)
Msiz = tag
print(Ooi,Msiz)
| p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,491 |
s290192744 | p00029 | u252368621 | 1481349868 | Python | Python3 | py | Accepted | 20 | 7300 | 263 | s=input().split()
dict={}
max=""
max_num=0
max_index=""
for i in s:
if i in dict:
dict[i]+=1
if max_num<dict[i]:
max_index=i
max_num=dict[i]
else: dict[i]=0
if len(i)>len(max):
max=i
print(max_index,max) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,492 |
s224035098 | p00029 | u811733736 | 1481685673 | Python | Python3 | py | Accepted | 30 | 7688 | 655 | import sys
from collections import Counter
if __name__ == '__main__':
# ??????????????\???
# line = 'Thank you for your mail and your lectures'
data = []
for line in sys.stdin:
data = line.strip().strip('.').lower().split(' ')
# print(data)
# ??????????¢??????????
c = Counter(data... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,493 |
s853129779 | p00029 | u546285759 | 1481965836 | Python | Python3 | py | Accepted | 30 | 7436 | 213 | text = [s for s in input().split()]
s_text = set(text)
a, b = 0, 0
for s in s_text:
if text.count(s) > a:
a = text.count(s)
x = s
if len(s) > b:
b = len(s)
y = s
print(x, y) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,494 |
s736586331 | p00029 | u661290476 | 1482380292 | Python | Python3 | py | Accepted | 30 | 7736 | 221 | from collections import defaultdict as dd
a=dd(int)
freq=0
leng=""
seq=""
b=input().split()
for i in b:
a[i]+=1
if freq<a[i]:
freq=a[i]
seq=i
if len(leng)<len(i):
leng=i
print(seq,leng) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,495 |
s355137848 | p00029 | u661290476 | 1482380742 | Python | Python3 | py | Accepted | 30 | 7672 | 205 | from collections import defaultdict as dd
a=dd(int)
freq=0
leng=""
seq=""
b=input().split()
for i in b:
a[i]+=1
if a[seq]<a[i]:
seq=i
if len(leng)<len(i):
leng=i
print(seq,leng) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,496 |
s945589309 | p00029 | u661290476 | 1482380902 | Python | Python3 | py | Accepted | 30 | 7664 | 194 | from collections import defaultdict as dd
a=dd(int)
leng=""
seq=""
for i in input().split():
a[i]+=1
if a[seq]<a[i]:
seq=i
if len(leng)<len(i):
leng=i
print(seq,leng) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,497 |
s363499542 | p00029 | u711765449 | 1484657385 | Python | Python3 | py | Accepted | 40 | 7396 | 314 | string = list(str(input()).split(' '))
l = [0]*len(string)
k = 0
r = 0
for i in range(len(string)):
if len(string[i]) > k:
k = len(string[i])
r = i
for j in range(len(string)):
if string[i] == string[j]:
l[i] += 1
m = l.index(max(l))
print(string[m],string[r],sep = ' ') | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,498 |
s159029895 | p00029 | u078042885 | 1484658202 | Python | Python3 | py | Accepted | 20 | 7404 | 58 | s=input().split()
print(max(s,key=s.count),max(s,key=len)) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,499 |
s951572065 | p00029 | u252414452 | 1486131590 | Python | Python | py | Accepted | 10 | 6300 | 383 | text = raw_input().rstrip()
words = text.split(" ")
d = {}
longest_word=""
frequency_word=""
max_count=0
for word in words:
if len(longest_word) < len(word):
longest_word = word
if d.has_key(word):
d[word] = d[word]+1
else:
d[word] = 1
if max_count < d[word]:
max_count = d[word]
frequenc... | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,500 |
s558085114 | p00029 | u032662562 | 1486794612 | Python | Python3 | py | Accepted | 30 | 7396 | 310 | import sys
dic = {}
txt = sys.stdin.read().strip().split()
for t in txt:
if t in dic:
dic[t] += 1
else:
dic[t] = 1
s = sorted(dic.items(),key=lambda x:x[1],reverse=1)
fre = s[0][0]
t = sorted(dic.items(),key=lambda x:len(x[0]),reverse=1)
longest = t[0][0]
print("%s %s" % (fre,longest)) | p00029 |
<H1>English Sentence</H1>
<p>
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
</p>
<p>
The text includes only alphabetical characters and spaces. A word i... | Thank you for your mail and your lectures
| your lectures
| 8,501 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.