2013-04-17 14:34:39 +08:00

9 lines
134 B
Python

total = 0
for i in xrange(1, 1002):
tmp = i * i
total += tmp + (1 - i % 2)
total += tmp + i + 1
print total - 1001 * 1002 - 1