H - HN
hhhh
Code
#include<cstdio>
#include<vector>
using namespace std;
vector<int>ans;
int main()
{
int n;
scanf("%d",&n);
while(n) {
n--;
if(n%3==0) ans.push_back(2);
else if(n%3==1) ans.push_back(3);
else ans.push_back(6);
n/=3;
}
for(int i=ans.size()-1;i>=0;i--) printf("%d",ans[i]);
return 0;
}