- csp-j2025 t1拼数(number)
4分
- @ 2025-11-1 13:58:36
#include<bits/stdc++.h> using namespace std; string t; int a[1005]; int main(){ int n,m; cin>>t; m=t.size(); for(int i=0;i<=t.size()-1;i++){ if(t[i]>=0&&t[i]<=9){ a[i]=t[i]; } } sort(a+0,a+m-1); for(int i=m-1;i>=0;i--){ cout<<t[i]; } return 0; }
1 comments
-
马熠涵 LV 6 @ 2025-11-1 14:07:32
(CE)
- 1
Information
- ID
- 3096
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 7
- Tags
- (None)
- # Submissions
- 67
- Accepted
- 16
- Uploaded By