2 条题解

  • 1
    @ 2026-4-1 12:51:53

    #include<bits/stdc++.h> #define int long long using namespace std; signed main(){ int x,t=0; cin>>x; while(x){ t+=x%10; x/=10; } cout<<t; return 0; }

    • 0
      @ 2026-3-30 13:03:28

      #include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int s=n%10+n%100/10+n%1000/100+n/1000; cout<<s; return 0; }

      • 1

      信息

      ID
      1858
      时间
      1000ms
      内存
      16MiB
      难度
      3
      标签
      递交数
      46
      已通过
      32
      上传者