SHARE
TWEET
Untitled
a guest
Jan 29th, 2018
44
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- x = int(input())
- while x != 0:
- flowers, leaves, steps = 0, 0, 0
- while x != 1 and steps < 16:
- if x%2 == 0:
- x = x / 2
- flowers = flowers + 1
- else:
- x = (3*x) + 1
- leaves = leaves + 1
- steps = steps + 1
- if steps < 16:
- print('TAK{}{}'.format(flowers,leaves))
- else:
- print('NIE')
RAW Paste Data

