题解 | #尼科彻斯定理#
尼科彻斯定理
http://www.nowcoder.com/practice/dbace3a5b3c4480e86ee3277f3fe1e85
不用遍历,看每个首位数字可以发现规律 1,3,7,13,21,31……逐个增加2*(m-1)
try:
n=int(input())
if n ==1:
print(1)
else:
count=1
for i in range(2,n+1):
count+=2*(i-1)
outlist=[count]
for j in range(n-1):
count+=2
outlist.append(count)
print(*outlist,sep='+')
except EOFError:
break