#include <iostream>
using namespace std;
bool check(int x,int n)
{
int q=x;
int t=0,res=0;
while(x)
{
t=x%n;
x/=n;
res+=t;
}
return q%res==0;
}
int main()
{
int n;
cin>>n;
int cnt=0;
for(int i=1;;i++)
{
int x=i;
if(check(x,2)&&check(x,10)&&check(x,8)&&check(x,16)) cnt++;
if(cnt==n)
{
cout<<x;
break;
}
}
return 0;
}
0 回复
0 转发
0 喜欢
0 阅读



