#include int main(void) { int n,tmp[1024*1024],*p; p=tmp; *p=0; scanf("%d",&n); while(n!=0){ *(p++)=n%7; n/=7; } while(p!=tmp){ printf("%d",*(p--)); } printf("%d¥n",*p); return 0; }