#include <stdio.h>
int main(void)
{
char c;
int i,n;
scanf("%d", &n);
for(i=0;i<n;i+=1)
{
scanf("%c", &c);
if((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))
{
if(c >= '0' && c <= '9')
printf("%c\n",c-'0');
else if(c >= 'a' && c <= 'f')
printf("%c\n",c-'a'+10);
else if(c >= 'A' && c <= 'F')
printf("%c\n",c-'A'+10);
}
else
printf("%d\n",c);
}
return 0;
}
onemoo
相关分类