AC

哈基米  •  16天前


include <bits/stdc++.h>

using namespace std;

int main() {

int n, sum = 0;
cin >> n;
while (n > 0) {
	int a = n % 10;
	sum = sum + a;
	n = n / 10;
}
cout << sum;
return 0;

}


评论:

请先登录,才能进行评论