Smallest number greater than or equal to N divisible by K | Function to find the smallest number greater than or equal to N that is divisible by k ; Driver Code
def findNum ( N , K ) : NEW_LINE INDENT rem = ( N + K ) % K ; NEW_LINE if ( rem == 0 ) : NEW_LINE INDENT return N NEW_LINE DEDENT else : NEW_LINE INDENT return ( N + K - rem ) NEW_LINE DEDENT DEDENT N = 45 NEW_LINE K = 6 NEW_LINE print ( ' Smallest ▁ number ▁ greater ▁ than ' , ' or ▁ equal ▁ to ' , N , ' that ▁ is ▁ divisible ▁ by ' , K , ' is ' , findNum ( 45 , 6 ) ) NEW_LINE