진행한 문제
2020, 1110, 10952, 2884, 14681, 1330
int start = 0;
cin >> start;
int temp = start;
int count = 0;
while(true)
{
int first = (temp / 10) % 10;
int second = temp % 10;
temp = ((temp % 10) * 10) + ((first + second) % 10);
++count;
if (temp == start)
break;
}
cout << count << endl;
한가지 알아야할 점이 10으로 나누면 실수값이 나오는데 뒤에 나머지 연산자로 계산해주면 정수부분 반환을 해준다