An integer is called N-free if its decimal expansion does not contain any substring representing a power of N except 1.

Let E(n) be the nth positive 79-free integer. For example E(1234) = 1256 and E(98765) = 102813.

Find the largest 3 digits of E( 10^{7} ) and type them in ascending order.

P.S. This is a Computer Science Problem and has almost been taken from P $$@

The answer is 668.

**
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.

JAVA CODE ::

import java.io.*;

import java.math.*;

class P442

{

}

OUTPUT::

--------------------Configuration: <Default>--------------------

10618506 10618506

Process completed.

Thus the answer is 668 ...

I was very much mesmerised by the problem in Project Euler and I used this same code with modifications to solve the problem given in the problem link but my program ran for 25 mins and then there was the alarm when the CPU temperature crossed 45 degree celsius , so I couldnt answer that problem ...