📜  代码片段 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:11.781000             🧑  作者: Mango

代码示例2
#code snippet
a=int(input('number'))
b,c=0,0
for i in range(1,a+1):
    if i%2==0:
        b+=i
    else:
        c+=i
d=b+c
print(b,c,d)
___________________________________________________________________________