他的示例里没有1,但题目的范围里是1,这段代码在cin >> n后还需要加if(n == 1) return 1; 这样自测示例里填1就可以得出1,否则为空无结果
点赞
牛客网
牛客网在线编程
牛客网题解
牛客企业服务