求反阶乘的两种算法
Inverse Factorial反阶乘
例
3! = 1 * 2 * 3 = 6
4! = 3! * 4 = 24
f(0)=-1
f(1)=1
f(2)=2
f(6)=3
f(24)=4
f(7)=-1
算法1
1 | public int inverseFactorial(int number) { |
算法2
1 | public int inverseFactorial(int number) { |
Inverse Factorial反阶乘
3! = 1 * 2 * 3 = 6
4! = 3! * 4 = 24
f(0)=-1
f(1)=1
f(2)=2
f(6)=3
f(24)=4
f(7)=-1
1 | public int inverseFactorial(int number) { |
1 | public int inverseFactorial(int number) { |