Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
101834 王子毅 各个位数之和 C++ Wrong Answer 1 MS 268 KB 200 2024-12-20 13:23:47

Tests(0/5):


Code:

#include<iostream> using namespace std; int main(){ int n,s,c; cin>>n; while(n!=0) { c=n%10; s+=c; n/=10; } cout<<s<<endl; return 0; }


Run Info:

------Input------
22222
------Answer-----
10
------Your output-----
4195074