题解 | #尼科彻斯定理#
尼科彻斯定理
https://www.nowcoder.com/practice/dbace3a5b3c4480e86ee3277f3fe1e85
n = int(input()) lifang = n ** 3 for i in range(1, lifang, 2): # for j in range(i, i+2*(n-1), 2): sum = (i + i + 2 * (n - 1)) / 2 * n # print(sum) if sum == lifang: result = list((range(i, i + 2 * (n - 1) +1, 2))) aa = [] for i in result: aa.append(str(i)) # print(result) print('+'.join(aa)) break