Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma GCC optimize("O3")
- #include <bits/stdc++.h>
- using namespace std;
- #define int long long
- #define io ios_base::sync_with_stdio(0); cin.tie(0)
- #define pb push_back
- #define F first
- #define S second
- #define endl '\n'
- const int N = 1e6 + 5;
- signed main()
- {
- io;
- int n;
- cin >> n;
- vector<int> v;
- for(int i = 2; i <= 9; i++){
- while(n % i == 0){
- v.pb(i);
- n /= i;
- }
- }
- if(n != 1){
- cout << "-1";
- return 0;
- }
- reverse(v.begin() , v.end());
- for(int i : v)
- cout << i;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement