human
Check if a given number is factorial of any number | Function to check if the given number is a factorial of any number.
Driver Code"
Solution in Python:
assistant
#Here is code to check if a given number is factorial of any number and the other steps required.
 def isFactorial ( n ) :
	i = 1 ;
	while ( True ) :
		if ( n % i == 0 ) :
			n //= i ;
		else :
			break ;
		i += 1 ;
	if ( n == 1 ) :
		return True ;
	else :
		return False ;
if __name__ == " _ _ main _ _ " :
	n = 24 ;
	ans = isFactorial ( n ) ;
	if ( ans == 1 ) :
		print ( " Yes " ) ;
	else :
		print ( " No " ) ;