题解 | #尼科彻斯定理#
尼科彻斯定理
https://www.nowcoder.com/practice/dbace3a5b3c4480e86ee3277f3fe1e85
while True: try: n = int(input()) mid = n * n dis = n - 1 start = mid - dis end = mid + dis for i in range(start, end +1): if i == start: res = str(start) elif i % 2 == 1: res += '+' + str(i) print(res) except: break