Run ID:132055
提交时间:2025-10-05 08:57:16
#include <iostream> #include <iomanip> using namespace std; int main() { int num; cin >> num; int thousand = num / 1000; int hundred = (num / 100) % 10; int ten = (num / 10) % 10; int unit = num % 10; int newNum = unit * 1000 + thousand * 100 + hundred * 10 + ten; // 输出4位数字,不足前面补0 cout << setw(4) << setfill('0') << newNum << endl; return 0; }