Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122537 王安安 各个位数之和 C++ Wrong Answer 1 MS 276 KB 198 2025-06-21 10:59:22

Tests(3/5):


Code:

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


Run Info:

------Input------
10111
------Answer-----
4
------Your output-----
13