4 solutions

  • 0
    @ 2025-8-19 16:20:15
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	int n;
    	cin>>n;
    	int a=n%10;
    	int b=n/10%10;
    	int c=n/100%10;
    	int d[3]={a,b,c};
    	sort(d,d+3);
    	reverse(d,d+3);
    	for(int i=0;i<3;i++){
    		cout<<d[i];
    	}
    	return 0;
    }
    
    
    
    • @ 2025-8-19 16:20:43

      清晰的思路,优秀的方法

Information

ID
36
Time
1000ms
Memory
256MiB
Difficulty
1
Tags
(None)
# Submissions
260
Accepted
75
Uploaded By