Advertisement
Spocoman

12. Factorial Division

Jan 30th, 2022
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. first = int(input())
  2. second = int(input())
  3.  
  4.  
  5. def factorial(n):
  6.     result = 1
  7.     for i in range(1, n + 1):
  8.         result *= i
  9.  
  10.     return result
  11.  
  12.  
  13. total = factorial(first) / factorial(second)
  14. print(f'{total:.2f}')
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement