全部评论 2

  • #include <bits/stdc++.h>
    using namespace std;
    int a[1005];
    int main(){
        int x,cnt = 0;
        cin >> x;
        while(x > 0){
            cnt += x%10;
            x = x / 10;
        }
        cout << cnt;
        return 0;
    }
    

    2025-06-29 来自 浙江

    0
  • easy

    2025-06-29 来自 浙江

    0

热门讨论