230k views
5 votes
The number n ends in exactly 7 zero's what is the smallest possible value of n

User Joebarbere
by
8.9k points

1 Answer

4 votes

To minimize a number ending in 7 zeros, pack the smallest digits possible at the front: 1 (start), 000002 (zeros & smallest non-divisible factor). So, 1000002 is smallest.

Start with a single "1" as the first digit. This is the smallest possible non-zero digit.

Add 7 zeros to the end. So far, our number is 1000000.

Now, try adding digits to the front of the number, starting from 2 (since we already used 1).

Check if the new number is still the smallest possible:

If the new number is divisible by 2, it's not the smallest possible because we can replace the "2" with a "1" and get a smaller number with the same number of zeros.

If the new number is divisible by 3, it's not the smallest possible because we can add a "2" in front of the existing "1" and get a smaller number with the same number of zeros.

Continue adding digits and checking for divisibility by 2 and 3 until you find a number that is not divisible by either. This will be your smallest possible value of n.

Following this method, you'll find that the smallest possible value of n is 1000002.

User Zagyi
by
7.9k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories