Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
131328 黄芃硕 各个位数之和 C++ Accepted 2 MS 272 KB 192 2025-09-22 18:37:14

Tests(5/5):


Code:

#include<iostream> using namespace std; int a[105][105],b[105][105]; int main() { int n; int sum=0; cin>>n; while(n!=0) { sum+=n%10; n=n/10; } cout<<sum; return 0; }