Run ID:97553
提交时间:2024-11-16 10:51:53
#include <iostream> using namespace std; int main() { int n, s = 0; cin >> n; while (n > 0) { s += n % 10; n = n/10; } cout << s << endl; return 0; }