Function to find the smallest number greater than or equal to N , that is divisible by k
int findNum ( int N , int K ) { int rem = ( N + K ) % K ; if ( rem == 0 ) return N ; else return N + K - rem ; }