+ 4
🔢 CHALLENGE: LYCHREL NUMBERS like 1⃣9⃣6⃣ (maybe)
It's simple! Write a function that return the number of iterations it takes to prove that a number is not a lychrel number. What??? A Lychrel number can't form a palindrome through the iterative process of repeatedly reversing its digits and adding the resulting numbers, says Wikipedia. 56 >> 65 >> 56 + 65 = 121 that is palindrome so output is 1. 57 >> 75 >> 57 + 75 = 132 >> 231 >> 132 + 231 = 363 it's palindrome so output is 2. In base ten no Lychrel numbers have been yet proved to exist. Can you?
4 Respostas
+ 2
https://code.sololearn.com/crAGzny7T8AX/?ref=app
+ 1
This is my solution. If you start whit a palindrome number output will be 0.
https://code.sololearn.com/chpaHqaNEDUm/?ref=app