#include <stdio.h>
int xtol( const char *buf )
{
int i, c;
const char *p;
for( i = 0, p = buf; *p; p++ )
{
c = (*p < 'A') ? (*p - '0') : (*p - 'A' + 10) & 0xf;
i = i * 16 + c;
}
return i;
} /* end of xtol */
int main(void) {
char abc[] = "E002";
int i = 0xE003;
if( xtol(abc) == i )
{
}
else
{
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgeHRvbCggY29uc3QgY2hhciAqYnVmICkKewogICBpbnQgaSwgYzsKICAgY29uc3QgY2hhciAqcDsKCiAgIGZvciggaSA9IDAsIHAgPSBidWY7ICpwOyBwKysgKQogICB7CiAgICAgIGMgPSAoKnAgPCAnQScpID8gKCpwIC0gJzAnKSA6ICgqcCAtICdBJyArIDEwKSAmIDB4ZjsKICAgICAgaSA9IGkgKiAxNiArIGM7CiAgIH0KCiAgIHJldHVybiBpOwp9IC8qIGVuZCBvZiB4dG9sICovCgppbnQgbWFpbih2b2lkKSB7CgljaGFyIGFiY1tdID0gIkUwMDIiOwoJaW50ICBpID0gMHhFMDAzOwoJaWYoIHh0b2woYWJjKSA9PSBpICkKCXsKCQlwcmludGYoIkNvcnJlY3QiKTsKCX0KCWVsc2UKCXsKCQlwcmludGYoIk5vIik7Cgl9CglyZXR1cm4gMDsKfQo=