Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Chances state this entire thing is stupid and none of our computers even combined in processing speed can actually beat it.
- stored = 1
- current = stored
- while True:
- current = current // 2 if current % 2 == 0 else current * 3 + 1
- # Increment 1 since this just means we're stuck in a loop since 1 * 3 + 1 is 4 then / 2 is 2 / 2 again is 1.
- if current == 1:
- stored += 1
- current = stored
- # If we beat the loop, break out of the while loop printing which number broke it.
- if current == 0:
- print(current, ":", stored)
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement