Find the Kth number which is not divisible by N | Python3 implementation to find the K 'th non-divisible number of N ; Function to find the Kth not divisible by N ; Driver Code ; Function Call
import math NEW_LINE def kthNonDivisible ( N , K ) : NEW_LINE INDENT return K + math . floor ( ( K - 1 ) / ( N - 1 ) ) NEW_LINE DEDENT N = 3 NEW_LINE K = 6 NEW_LINE print ( kthNonDivisible ( N , K ) ) NEW_LINE