题解 | #尼科彻斯定理#
尼科彻斯定理
http://www.nowcoder.com/practice/dbace3a5b3c4480e86ee3277f3fe1e85
找规律,当num = 6 那么就是 6*5 + 1 ,33 ,35, 37 ,39 ,41 (num个数相加)
while True:
try:
num = int(input())
target = num * (num - 1) + 1
b = []
for i in range(num):
b.append(target)
target += 2
for i in range(len(b)):
b[i] = str(b[i])
print('+'.join(b))
except:
break
华为机试题解(prod.by kedao) 文章被收录于专栏
华为实习机试题解
