1 solutions
-
0
#include <iostream> #include<bits/stdc++.h> #include<string> using namespace std; int main() { int n; cin >> n; int a[25]; int len = 1; do{ a[len] = n%10; n /= 10; len++; }while(n != 0); sort(a + 1, a + len); int j = 0; int i = 1; do{ if(a[i] != 0){ j = i; }else{ i++; } }while(j == 0); cout << a[j]; for(int i = 1 ;i < len ;i++){ if(i != j){ cout << a[i]; } } return 0; }
- 1
Information
- ID
- 457
- Time
- 1000ms
- Memory
- 16MiB
- Difficulty
- 10
- Tags
- # Submissions
- 4
- Accepted
- 3
- Uploaded By