#include
#define MAXN 10
void f( long int x, char *p );
int main()
{ long int x;
char s[MAXN] = "";
scanf("%ld", &x);
f(x, s); printf("%s\n", s);
return 0;
}
void f(long x,char * s)
{
int i=0,j=0,c;
if (x < 0){s[0] = '-'; x=-x; i=j=1;}
do{
s[i]=x%16;
s[i]+=s[i]<10?48:55;
i++;
x/=16;
}while(x>0);
s[i]='\0';
for(i--;j{c=s[j];s[j]=s[i];s[i]=c;}
}
#include
#define MAXN 10
void f( long int x, char *p );
int main()
{
long int x;
char s[MAXN] = "";
scanf("%ld", &x);
f(x, s);
printf("%s\n", s);
return 0;
} /* 你的代码将被嵌在这里 */
void f(long x,char * s)
{
int i,j,c;
long t=x;
if (x < 0)
{
s[0] = '-';
x=-x;
}
for(i=(t<0?0:-1);x>0;i)
{
s[++i]=x%16;
x/=16;
}
for(j=i;j>=(t<0?1:0);j--)
if(s[j]<10)s[j]+=48;
else s[j]+=55;
s[i+1]='\0';
for(j=t<0?1:0;j {c=s[j];s[j]=s[i];s[i]=c;}
}