Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78356 田苒彤 各个位数之和 C++ Accepted 1 MS 272 KB 162 2024-06-18 19:35:15

Tests(5/5):


Code:

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