Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122432 邹金行 各个位数之和 C++ Wrong Answer 1 MS 272 KB 204 2025-06-19 19:29:49

Tests(0/5):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n; int i=0; int sum=0; int ld; cin>>n; while(n!=0){ ld=n%10; n=n/10; i++; sum+=ld; } cout<<i; return 0; }


Run Info:

------Input------
22222
------Answer-----
10
------Your output-----
5