Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def fact(x):
- sum = 1
- res = 0
- if x == 1:
- return 1
- if x == 0:
- return 0
- for i in reversed(range(1, x + 1)):
- sum *= i
- return sum
- def func_fact(n):
- for i in range(13, 501):
- if fact(i) % n == 0:
- print(i)
- return i
- return 0
- def sigma(M, N):
- print(sum(list(map(lambda i: func_fact(i), range(M, N + 1)))))
- sigma(600000000, 610000000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement