Paste: 求和

Author: ralph
Mode: python
Date: Tue, 24 Aug 2021 06:44:21
Plain Text |
a=int(input())
sumx=[0,0] #第一个偶数和,第二个奇数和
for i in range(1,a+1):
    sumx[i%2]+=i
print("",sumx[1],sep=' ')#sep=分隔符
print("",sumx[0],sep=' ')

New Annotation

Summary:
Author:
Mode:
Body: