实现1*2+3*4+5*6+7*8...+99*100 total = 0 x = 1 y = 2 while y <= 100: total += x * y x += 2 y += 2 print(total)