XJTU_Python_Problems/codes/8.py

6 lines
95 B
Python

n = int(input())
sum = 0
for i in range(n):
if((i+1) % 2==1):
sum += i+1
print(sum)