Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
8050 余立涵 各个位数之和 C++ Accepted 0 MS 264 KB 183 2025-06-07 19:21:04

Tests(5/5):


Code:

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