From charlesreid1

Problem Statement

Lychrel numbers are numbers that, when you repeatedly reverse and add to itself, never produces a palindrome.

How many Lychrel numbers are there below ten-thousand?

Link: https://projecteuler.net/problem=55

Solution Technique

Our technique is to implement a maximum on the number of times we reverse a number and add it to itself - namely, 50. If a number reaches 50 iterations and still has not reached a palindrome, we declare it a Lychrel number.

Code

Link: https://git.charlesreid1.com/cs/euler/src/master/scratch/Round2_050-070/055/Lychrel.java

Flags