Largest palindrome product
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 × 99.
Find the largest palindrome made from the product of two 3-digit numbers.
1.枚举
- 利用两个for循环枚举两个三位数相乘
- 判断相乘的乘积是否是回文整数(将数字倒置判断是否等于原数字
- 动态刷新最大回文整数
1 |
|
2.回文数判断
1 | //回文数字的判断 |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.