2 条题解
- 1
信息
- ID
- 30033
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 2
- 标签
- 递交数
- 107
- 已通过
- 62
- 上传者
#include <iostream>
using namespace std;
int main()
{
int x;
cin >> x;
int a = x / 1000; // 千位
int b = x / 100 % 10; // 百位
int c = x / 10 % 10; // 十位
int d = x % 10; // 个位
int res = d*1000 + c*100 + b*10 + a;
cout << res;
return 0;
}