fork download
  1. def reverse_factorial(num):
  2. i = 1
  3. while num > 1:
  4. i += 1
  5. num /= i
  6. if num == 1:
  7. return i
  8. for num in [3628800, 479001600, 6, 18]:
  9. print reverse_factorial(num)
Success #stdin #stdout 0s 9024KB
stdin
Standard input is empty
stdout
10
12
3
None