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

int main() {
	int x, a, b, c, d;
	cin >> x;
	a = x / 1000;
	b = x % 1000 / 100;
	c = x % 100 / 10;
	d = x % 10;
	cout << d << c << b << a;

	return 0;
}

5 条评论

  • @ 2026-3-4 14:33:07
    #include <bits/stdc++.h>
    using namespace std;
    int main() {
    	string s;
    	int a[1000000];
    	cin>>s;
    	reverse(s.begin(),s.end());
    	int len=s.size();
    	for(int i=0;i<len;i++)a[i]=s[i]-'0';
    	for(int i=0;i<len;i++)cout<<a[i];
    	return 0;
    }
    //最大可倒序输出一百万位数的整数
    
    
    
    • @ 2026-2-6 21:09:39

      jia de

      • @ 2026-2-6 14:56:28

        第几题

        • @ 2026-2-6 14:55:47

          666

          • @ 2026-2-5 15:46:50
            题库答案
            
            • 1