@root 我哪儿错了

12121 Game for peace 2024-08-16 12:22:24 4
#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    if (n % 10 / 1 == 0){
        cout << n % 100 / 10 << n / 100;
    }
    else{
        cout << n % 10 / 1 << n % 100 / 10 << n / 100;
    }
    return 0;
}
{{ vote && vote.total.up }}

共 1 条回复

root 站长

就是要考虑个位有0的情况,不过在思考一下,如果个位和十位同时是 0,需要特殊处理不?