Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78350 陈昊然 各个位数之和 C++ Accepted 0 MS 272 KB 168 2024-06-18 19:25:33

Tests(5/5):


Code:

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