#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; }
#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;
}
使用您的 蒙青创OJ 通用账户