3276. 连续正整数之和

kadxm123

题解加注释:
http://blog.csdn.net/kangyan__/article/details/72666912

woria

n=int(input())
for e in range(n):
x=int(input())
if x==3:sum=1
else:
sum=0
for k in range(2,x//2+1):
if 2x%k==0:
if (2
x/k-k+1)%2==0 and (2x/k-k+1)>0 and (2x/k-k+1)/2!=0:
sum+=1
print(‘Case {0}: {1}’.format(e+1,sum))

你当前正在回复 博客/题目
存在问题!