Showing:
Handle Score
@Ibrahim Nash 6420
@mb1973 5704
@Quandray 5245
@akhayrutdinov 5111
@saiujwal13083 5046
@sanjay05 3762
@kirtidee18 3673
@mantu_singh 3530
@marius_valentin_dragoi 3523
@sushant_a 3459
Factorial Number
Basic Accuracy: 52.51% Submissions: 181 Points: 1

For a given number N, find whether it is a factorial number or not. A Factorial number is a number which is equal to the factorial value of other numbers.

Example 1:

Input:
N = 6
Output:
1
Explanation:
6 is factorial of 3

Example 2:

Input:
N = 5
Output:
0
Explanation:
no number's factorial is 5.

You don't need to read input or print anything. Your task is to complete the function isFactorial() which takes an integer N as input parameters and returns 1 if N is a factorial number, or 0 otherwise.

Expected Time Complexity: O(log N)
Expected Space Complexity: O(1)

Constraints:
1 <= N <= 100000