Shota
elliotalders0n
Продвинутый
Georgia
Присоединился 28 сент. 2024 г.
Рейтинг
1222
Задачи8
Отправки11
I think the provided test case is incorrect. Let n be the "palindrome level" counter:
865 is not a palindrome so 865 + 568 = 1433 (n = 1)
1433 is not a palindrome so 1433 + 3314 = 7474 (n = 2).
And this is where the program stops in the test case. But 7474 is obviously not a palindrome either.If we repeat the operation a third time we get: 7474 + 4747 = 12221 which IS a palindrome. Therefore, n = 3 is the answer.Am I missing something?
The English-language version of the problem description is quite confusing in my opinion