fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int n;
  4. string s;
  5. vector<int> v;
  6. int main(){
  7. cin >> n;
  8. for(int i = 0; i < n; i++){
  9. cin >> s;
  10. string ret = "";
  11. if(s[i] < 97 || s[i] > 122) ret += s[i];
  12. else {
  13. if(ret.size()){
  14. cout << atoi(ret.c_str()) << '\n';
  15. v.push_back(atoi(ret.c_str()));
  16. ret = "";
  17. }
  18. }
  19. }
  20. sort(v.begin(), v.end());
  21. for(int a : v) cout << a << '\n';
  22. }
Success #stdin #stdout 0.01s 5288KB
stdin
2
lo3za4
01
stdout
Standard output is empty