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