project-euler/120_square_remainders.py

7 lines
107 B
Python
Raw Normal View History

2023-03-26 17:21:44 +02:00
#!/usr/bin/env python3
def main(n):
return sum(a*(a-2+a%2) for a in range(3, n+1))
print(main(1000))