ac zhyf · 发布于 2025-10-08 · 浏览 370 回复 0 include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d", &n); int m = 0; while (n > 0) { m = m + n % 10; n = n / 10; } printf("%d", m); return 0; }