Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
111501 谢佳辰 各个位数之和 C++ Accepted 1 MS 272 KB 190 2025-03-02 14:31:40

Tests(5/5):


Code:

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