Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = 3
- res = 1
- prev_fact = None
- for i in range(1, N+1):
- if i == 1:
- fact = 1
- else:
- fact = prev_fact * i
- res *= fact
- prev_fact = fact
- print(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement