human
Program to find the N | Python3 program to find n - th number containing only 3 and 5..
If n is odd , append 3 and move to parent.
If n is even , append 5 and move to parent.
Reverse res and return ..
Driver code"
Solution in Python:
assistant
#Here is code to program to find the N and the other steps required.
 def reverse ( s ) :
	if len ( s ) == 0 :
		return s
	else :
		return reverse ( s [ 1 : ] ) + s [ 0 ]
def findNthNo ( n ) :
	res = " " ;
	while ( n >= 1 ) :
		if ( n & 1 ) :
			res = res + "3" ;
			n = ( int ) ( ( n - 1 ) / 2 ) ;
		else :
			res = res + "5" ;
			n = ( int ) ( ( n - 2 ) / 2 ) ;
	return reverse ( res ) ;
n = 5 ;
print ( findNthNo ( n ) ) ;