include iostream include string include vector using namespace std int

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string a;
vector<int> b;
int l;
int x;
cin >> a;
x=a.find("0");
if(x>=0)
b.push_back(0);
x=a.find("1");
if(x>=0)
b.push_back(1);
x=a.find("2");
if(x>=0)
b.push_back(2);
x=a.find("3");
if(x>=0)
b.push_back(3);
x=a.find("4");
if(x>=0)
b.push_back(4);
x=a.find("5");
if(x>=0)
b.push_back(5);
x=a.find("6");
if(x>=0)
b.push_back(6);
x=a.find("7");
if(x>=0)
b.push_back(7);
x=a.find("8");
if(x>=0)
b.push_back(8);
x=a.find("9");
if(x>=0)
b.push_back(9);
for( int i=0;i<b.size();i++){
cout << b[i];
}
if(b.size()==0){
cout << "NO";
}
}