Collatz conjecture
unknown
plain_text
3 years ago
167 B
5
Indexable
n=int(input("n ="))
while n != 1:
if n % 2 == 0:
n=n/2
result=n
else:
n=(n*3)+1
result=n
print(int(result))Editor is loading...