Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
164755 冉骏杰 各个位数之和 C++ Accepted 1 MS 272 KB 197 2026-11-07 14:06:27

Tests(5/5):


Code:

#include<iostream> using namespace std; long long a,c; int main() { cin>>a; if(a == 0){ cout<<0; return 0; } while(a!=0){ c+=a%10; a=a/10; } cout<<c; return 0 ; }