Smallest N digit number divisible by N | Python3 program for the above approach ; Function to find the smallest N - digit number divisible by N ; Return the smallest N - digit number calculated using above formula ; Given N ; Function Call
import math NEW_LINE def smallestNumber ( N ) : NEW_LINE INDENT return N * math . ceil ( pow ( 10 , ( N - 1 ) ) // N ) ; NEW_LINE DEDENT N = 2 ; NEW_LINE print ( smallestNumber ( N ) ) ; NEW_LINE