Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def solution(num, lst):
- elst = []
- cnt = 0;
- for i in range(1, len(lst)):
- ans = i // num +1 ;
- ans2 = i % num + 1;
- if lst[i] in lst[:i]:
- print("ch")
- return [ans2, ans];
- elif lst[i][0] != lst[i-1][-1]:
- print("ch", i)
- return [ans2, ans];
- else:
- return [0,0];
Add Comment
Please, Sign In to add comment