Advertisement
Saleh127

cf 515C

Sep 3rd, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; while(t--)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);
  9. cout.tie(0);
  10.  
  11. ll c,e,f=1,i,j,k,l;
  12. string d,a,x[]= {"","","2","3","322","5","53","7","7222","7332"};;
  13. cin>>c>>d;
  14. for(i=0;i<c;i++)
  15. {
  16. e=d[i]-'0';
  17. a+=x[e];
  18. }
  19. sort(a.rbegin(),a.rend());
  20. cout<<a<<endl;
  21. return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement