Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
8049 余立涵 各个位数之和 C++ Compile Error 0 MS 0 KB 238 2025-06-07 19:19:40

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int s,x=0; cin>>s; while(1){ x=x+s%10; s=s/10; if(s==0){ cout<<x<<endl; break; } } return 0;


Run Info:

Main.cc: In function 'int main()':
Main.cc:14:13: error: expected '}' at end of input
     return 0;
             ^