top1编程
← 返回题目
题解

【入门】谁的年龄大

1 条题解

  • 0
    @ 2026-7-28 22:09:41
    #include <bits/stdc++.h>
    using namespace std;
    
    int main(){
        int n;
        cin>>n;
        int x = n % 10 * 10 + n / 10;
        if(n > x){
        	cout<<n;
    	}else{
    		cout<<x;
    	}
    }
    
    • 1