The smallest value

Report a typo

A user inputs a positive BigInteger number M. You need to find out what is the smallest long n, so that n! >= M.

Use the BigInteger class to solve the problem. Otherwise, your solution won't pass all the tests.

Do not forget to import all the needed classes.

Just in case: wiki on factorials.

Sample Input 1:

3628799

Sample Output 1:

10

Sample Input 2:

39916800

Sample Output 2:

11
Write a program in Java 17
class Main {
public static void main(String[] args) {
// put your code here
}
}
___

Create a free account to access the full topic