@Korkin/

euler5

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
n = 40
nums = {0:1,4:2,6:1,8:2,9:3,15:1,16:2,21:1,25:5,27:3,32:2,33:1,35:1,39:1}
ans = 1
for i in range(n+1):
    if i not in nums and (i<10 or i%2==1):
        ans*=i
    elif i in nums:
        ans*=nums[i]
print(ans)