2 条题解

  • 3
    @ 2026-6-4 22:42:04
    #include <bits/stdc++.h>
    using namespace std;
    int main() {
    int x;
        cin >> x;
        while (x > 0)
        {
            cout << x % 10;
            x = x / 10;
            if(x > 0) cout << " ";
        }
        return 0;
    }
    
    
    
    • 0
      @ 2026-6-5 20:00:11

      #include <bits/stdc++.h> using namespace std;

      int main() { int x; cin >> x; bool first = true; while (x > 0) { int n = x % 10; if (first) { cout << n; first = false; } else { cout << " " << n;

      	}
      	x /= 10;
      }
      
      return 0;
      

      }

      • 1

      信息

      ID
      30960
      时间
      1000ms
      内存
      256MiB
      难度
      1
      标签
      (无)
      递交数
      57
      已通过
      41
      上传者