题解 | #尼科彻斯定理#
尼科彻斯定理
http://www.nowcoder.com/practice/dbace3a5b3c4480e86ee3277f3fe1e85
while True:
try:
n = int(input())
l = [i for i in range(1, n**3+1) if i%2 != 0]
for i in range(len(l)):
if sum(l[i:n+i]) == n**3:
print('+'.join(map(str,l[i:n+i])))
except:
break
查看1道真题和解析

