public class Solution {
public int solution(int n) {
int answer = 0;
*** 이동 횟수 세기
while(n!=0) {
*** 도착 지점에서 0으로 이동이 끝나기 전까지 반복해라
if(n%2==0) n = n/2;
*** 현재 위치가 2로 나누어 떨어지면 순간이동하여라
else {
answer++;
n -= 1;
*** 순간이동이 불가능하다면 한 칸 앞으로 이동하고 이동 횟수 1 추가
}
}
return answer;
}
}
Really impressed with the welcome offer. It gave me a great start to explore all the different slots available. Cheers to phjili12345
LuckyLifeCasino – living up to its name! I had some good spins here, and the site is easy to use. Definitely recommend checking it out. Get lucky with luckylifecasino!