C*Y 发帖数: 736 | 1 I was asked this question in a well-known small company yesterday. We can
prove that, the largest palindrome that are the product of two 2-
digit numbers is 9009 (because 9009 = 99 * 91). Now the question is, how to
find the largest palindrome number that are the product of two 3-digit
numbers?
I just googled this question. All I can found is a brute force algorithm, by
exhaustively testing every number that can be made from the product of two
3-digit
numbers to see if it is a palindrome and rec |
l******c 发帖数: 2555 | 2 99 * 91 = 9009
99x * 91y = 9....9
x * y = 9
so x = y = 3
993 * 913 = 906609 |
C*Y 发帖数: 736 | 3 没看懂 :(
能解释一下吗?
为什么因为99 * 91 = 9009,所以答案就能表示成99x * 91y?
【在 l******c 的大作中提到】 : 99 * 91 = 9009 : 99x * 91y = 9....9 : x * y = 9 : so x = y = 3 : 993 * 913 = 906609
|
l******c 发帖数: 2555 | 4 that's my solution.
I hope others can give different solutions
【在 C*Y 的大作中提到】 : 没看懂 :( : 能解释一下吗? : 为什么因为99 * 91 = 9009,所以答案就能表示成99x * 91y?
|
C*Y 发帖数: 736 | 5 当时我用的办法是从乘法表的右下角开始,以从东北方向指向西南方向的斜线一层层的
往左上角平移,也是得到答案906609。不过回家路上回想起来发现这个办法是错误的
【在 l******c 的大作中提到】 : that's my solution. : I hope others can give different solutions
|
l******c 发帖数: 2555 | 6 I don't understand why the company asked this kind of questions.
Any pratical use?
【在 C*Y 的大作中提到】 : 当时我用的办法是从乘法表的右下角开始,以从东北方向指向西南方向的斜线一层层的 : 往左上角平移,也是得到答案906609。不过回家路上回想起来发现这个办法是错误的
|