Largest palindrome product - euler project

后端 未结 15 2065
广开言路
广开言路 2020-12-10 22:05

I was trying to solve project Euler problem 4 which is:

A palindromic number reads the same both ways. The largest palindrome made from the product of tw

15条回答
  •  再見小時候
    2020-12-10 22:49

    You are also assuming that the first palindrome you'll find will be the largest. The first palindrome you'll find is 580085 which isn't the right answer.

    You are also assuming that the first palindrome you'll find is the product of two 3 digit numbers. You should also use two different numbers instead of multiplying 999 with 999 and iterating down to 100 * 100.

提交回复
热议问题