human
What is a code to find the Nth natural number which is not divisible by A and the other steps required given the following:
Find the Nth natural number which is not divisible by A | Python3 code to Find the Nth number which is not divisible by A from the series.
Find the quotient and the remainder when k is divided by n - 1.
if remainder is 0 then multiply n by q and add the remainder.
print the answer.
driver code"
Solution in Python:
assistant
#Here is code to find the Nth natural number which is not divisible by A and the other steps required.
 def findNum ( n , k ) :
	q = k // ( n - 1 )
	r = k % ( n - 1 )
	if ( r != 0 ) :
		a = ( n * q ) + r
	else :
		a = ( n * q ) - 1
	print ( a )
A = 4
N = 6
findNum ( A , N )