-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProblem_17.py
52 lines (35 loc) · 945 Bytes
/
Problem_17.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
def count_Text(x1, x2, x3):
Max = 0
count1 = 0
count2 = 0
count3 = 0
while True:
count = 0
for i in range(len(x1)):
count += 1
if count > Max:
Max = count
count1 += count
count = 0
for i in range(len(x2)):
count += 1
if count > Max:
Max = count
count2 += count
count = 0
for i in range(len(x3)):
count += 1
if count > Max:
Max = count
count3 += count
break
if count1 + count2 == count1 + count3 and count2 + count3 == count1 + count2:
print("All the same")
elif count1 == count2 or count1 == count3 or count2 == count3:
print("Neither")
else:
print(Max)
n1 = input().__str__()
n2 = input().__str__()
n3 = input().__str__()
count_Text(n1, n2, n3)