题解 | #尼科彻斯定理# 来告诉大家怎么看出规律

尼科彻斯定理

https://www.nowcoder.com/practice/dbace3a5b3c4480e86ee3277f3fe1e85

另外 m(m-1) 是偶数 所以x必是奇数不用多说吧[狗头]

m = int(input())

x = m**2-m+1
out = []
for i in range(m):
    out.append(x+2*i)

temp = [str(i) for i in out]
print("+".join(temp))

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务