You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func solution(_ num:Int)->Int{varnum= num
varresult=0
while num !=1{
if num %2==0{
num /=2}else{
num = num *3+1}
result +=1
if result >=500{
result =-1
break
}}return result
}
The text was updated successfully, but these errors were encountered:
💬 문제
[코딩테스트 연습 - 콜라츠 추측](https://school.programmers.co.kr/learn/courses/30/lessons/12943)
💬 풀이
The text was updated successfully, but these errors were encountered: