Compare commits
No commits in common. "main" and "1.0" have entirely different histories.
@ -1,7 +1,16 @@
|
|||||||
txt = input().lower().split()
|
txt = input().split()
|
||||||
while txt[-1] != "###":
|
while txt[-1] != "###":
|
||||||
txt += input().lower().split()
|
txt += input().split()
|
||||||
m = [0]*len(txt)
|
amount = {}
|
||||||
for i in range(len(txt)):
|
for i in txt:
|
||||||
m[i]=txt.count(txt[i])
|
if i.lower() in amount:
|
||||||
print(txt[m.index(max(m))])
|
amount[i.lower()] += 1
|
||||||
|
else:
|
||||||
|
amount[i.lower()] = 1
|
||||||
|
max = ["", 0]
|
||||||
|
for i in amount:
|
||||||
|
if amount[i] > max[1]:
|
||||||
|
max = [i, amount[i]]
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
print(max[0])
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
def choose(n, k):
|
def choose(n, k):
|
||||||
res = n/k
|
res = n/k
|
||||||
while k > 1:
|
while k > 1:
|
||||||
n -= 1
|
n-= 1
|
||||||
k -= 1
|
k -= 1
|
||||||
res *= n/k
|
res *= n/k
|
||||||
return res
|
return res
|
||||||
|
Loading…
Reference in New Issue
Block a user