第一次提交时出现Presentation Error 出现这种错误的原因为格式错误 再次看题目留意到要多输出一行空行 下面为AC代码 #include <iostream> using namespace std; int main() { int n,i,sum=0; while