Project Euler 4
Project Euler 4
题目
Largest palindrome product
A palindromic number reads the same both ways. The largest palindrome made from the product of two \(2\)-digit numbers is \(9009 = 91 \times 99\).
Find the largest palindrome made from the product of two \(3\)-digit numbers.
解决方法
直接枚举所有的三位数和三位数的乘积,然后再判断乘积的值是否为回文字符串即可。
代码
1 | N = 3 |