Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140309 万麟峰 各个位数之和 C++ Accepted 0 MS 272 KB 162 2025-12-14 10:57:58

Tests(5/5):


Code:

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