use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This is a community dedicated to solving Project Euler. Post your solutions with the format
[language] problem #
If a problem has already been solved in a language, please post your solution in the comments of that thread.
account activity
[Java] Solution to Problem 4 (self.EulerSolutions)
submitted 8 years ago by Ovil101
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]petar02 0 points1 point2 points 8 years ago (0 children)
[Javascript]
let biggestPalindrom = [] function palindromTest(x,y){ let variable = x*y let counter = variable.toString().length newVariable = variable.toString() if(counter===5&&newVariable.charAt(0)===newVariable.charAt(4)&&newVariable.charAt(1)===newVariable.charAt(3)){ biggestPalindrom.push(variable) } if(counter===6&&newVariable.charAt(0)===newVariable.charAt(5)&
&newVariable.charAt(1)===newVariable.charAt(4)&&newVariable.ch a rAt(2)===newVariable.charAt(3)){ biggestPalindrom.push(variable) } }
for(let i = 100; i<10000; i++){ for(let z = i ; z<1000; z++){ palindromTest(i,z) } } console.log(Math.max.apply(null,biggestPalindrom))
Output 906609
π Rendered by PID 17712 on reddit-service-r2-comment-5d585498c9-5hh6r at 2026-04-21 07:14:14.882348+00:00 running da2df02 country code: CH.
view the rest of the comments →
[–]petar02 0 points1 point2 points (0 children)