Let m and n be two different positive integers in reverse order (e.g. 1 2 3 4 and 4 3 2 1 ). Given that m n = 2 9 8 8 9 4 9 5 6 6 6 7 , find the value of m + n .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
... All I can say is that the two numbers are 314159 and 951413. How to figure that out is left as an exercise to the solver (Good luck! You'll need it)
i know how to solve it prime factorize and find. it takes a hell of time to prime factorize this godzilla
But how did you solve this???
Teach us! HAHAHA
21.7 sec , counting from 0 . Slow... but it works...
I used a Python coding:
The answer for m = ⌊ 1 0 0 0 0 0 π ⌋ .
1 2 3 |
|
Cracking a walnut with a truck.
Python :
1 2 3 4 5 6 |
|
So you have improved using Python.
Python:
1 2 3 4 5 6 7 |
|
All you need to do is to find out the factors of 298894956667.
Here is the java solution. I was going to make the solution more specific, but then I realized that 298894956667 has only 2 factors other than the number itself and 1.
for(int i = 100_000;i < 1_000_000;i++)
if(298894956667d % i == 0)
System.out.println(i);
Also one more thing to notice is that the factors will be between 1 million and 100 thousand.
I worked simultaneously from left and right matching till I got to the middle where I found that the squares of the digits add up to 133. Looking at both the ends 9 and 3 were obvious then 5, 4, 1 and 1 were possible choice. Of course there was lot of effort involved. Please share better methods.
Problem Loading...
Note Loading...
Set Loading...
There are only 4 divisors of 2 9 8 8 9 4 9 5 6 6 6 7 : the number itself, 1 , 3 1 4 1 5 9 , and 9 5 1 4 1 3 . Since m and n are positive integers in reverse order, they must be 3 1 4 1 5 9 and 9 5 1 4 1 3 . m + n = 3 1 4 1 5 9 + 9 5 1 4 1 3 = 1 2 6 5 5 7 2