Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
161135 王翊金恩 各个位数之和 C++ Accepted 1 MS 264 KB 191 2026-09-30 19:38:49

Tests(5/5):


Code:

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