#1-2+3-4...+99除88以外的所有数的总和 cum = 0 count = 0 while count < 99: count += 1 #输出1-99 #print(count) if count == 88: continue if count % 2 == 0: cum -= count else: cum += count print(cum)