1. 문제
https://programmers.co.kr/learn/courses/30/lessons/12943
2. 풀이
def solution(num):
try_num = 0
while try_num < 500:
if num == 1:
return try_num
if num % 2 == 0 :
num /= 2
elif num % 2 == 1 :
num = num * 3 + 1
try_num += 1
return -1