4 solutions

  • 1
    @ 2025-12-27 11:00:24

    #include <stdio.h>

    int main() { int n; scanf("%d", &n);

    // 取出每一位数字
    int ge = n % 10;      // 个位
    int shi = (n / 10) % 10; // 十位
    int bai = n / 100;    // 百位
    
    // 反向输出
    printf("%d%d%d\n", ge, shi, bai);
    
    return 0;
    

    }

    • 1
      @ 2025-9-24 22:49:45

      #include using namespace std; int main() { int a = 0; cin >> a; int b = a % 10; int c = a / 10 % 10; int d = a / 100; cout << b << c << d << endl; system("pause"); return 0; }

      • 1
        @ 2024-9-24 12:10:16

        #include<stdio.h> int main() { int n; scanf("%d",&n); while(n!=0){ printf("%d",n%10); n/=10; } return 0; }

        • 1
          @ 2023-9-30 13:47:15
          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
               string s;
          	cin>>s;
          	reverse(s.begin(),s.end());
          	cout<<s;
               return 0;
          }
          
          • 1

          Information

          ID
          6723
          Time
          1000ms
          Memory
          128MiB
          Difficulty
          5
          Tags
          (None)
          # Submissions
          385
          Accepted
          141
          Uploaded By