这道题……看上去挺唬人……
其实解法很多,数学或者暴力随你……
我算是半数学吧……没大用公式,都是按照差来算的……
sum_up = 25
last_max = 9 #last_max is the previous circle's largest one. on the up-right corner.
base = 25 #base is the base difference between last_max and the new circle's min.
for circle in range(2, 501):
base += 2
sum_up += base*10 + last_max*4
last_max += base*4
print(sum_up)