2 条题解

  • 3
    @ 2024-5-31 16:08:30
    #include <cstring>
    #include <algorithm>
    using namespace std;
    int main()
    {
        int n;
        cin >> n;
        int ans = 0;
        int t1 = n / 100;
        int t2 = n /10%10;
        int t3 = n % 10;
        if(t3 != 0)
        {
            ans =t3 * 100 + t2 * 10 + t1;
        }
        else 
        {
            ans = t2 * 10 + t1;
        }
        cout << ans <<endl;
        
    }
    
    • 1
      @ 2025-8-19 9:23:50
      #include<bits/stdc++.h>
      using namespace std;
      int main(){
          int n;
          cin>>n;
          int t1=n%10;
          int t2=n/10%10;
          int t3=n/100;
          cout<<t1*100+t2*10+t3;
          return 0;
      }
      
      • 1

      信息

      ID
      198
      时间
      1000ms
      内存
      128MiB
      难度
      1
      标签
      递交数
      1180
      已通过
      335
      上传者