Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1284 -> [0, 100, 200, 100, 200, 300, 600]
- 1285 -> [0, 100, 200, 100, 200, 300, 500, 999]
- 1286 -> [0, 100, 200, 300, 600]
- ...
- 13023 -> [0, 100, 170, 100, 200]
- 0 -> 100
- 100 -> 200
- 200 -> 100
- 100 -> 200
- 200 -> 300
- 300 -> 100
- list_1284 = [0, 100, 200, 100, 200, 300, 600]
- set_1284 = set(list_1284)
- if len(set_1284) != len(list_1284):
- print "There exists a loop"
- else:
- print "No loop exists"
Add Comment
Please, Sign In to add comment