-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtesting.py
More file actions
35 lines (27 loc) · 924 Bytes
/
testing.py
File metadata and controls
35 lines (27 loc) · 924 Bytes
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
import sys
from collections import defaultdict
def Solution(number):
total_count = 0
for i in range(0, len(number) - 1):
print("loop i", i)
j_ptr = i+1
for j in range(j_ptr, len(number) - 1):
# print("printing j", j)
if int(number[i]) != int(number[j]):
continue
print("loop j", j)
k_ptr=j+1
for k in range(k_ptr, len(number) - 1):
if int(number[i]) + 1 != int(number[k]):
continue
print("loop k", k)
l_ptr=k+1
for l in range(l_ptr, len(number) - 1):
if int(number[k]) != int(number[l]):
continue
else:
print("loop l", l)
total_count += 1
return total_count
line = sys.stdin.readline()
print(Solution(line))