#include <stdio.h>
#include <string.h>
int quin2dec(char *str)
{
int i, value = 0;
char s[] = "rhfmy";
char *p;
for (i = 0; i < 4; i++) {
if (str[i] == '\0') {
break;
}
if (p == NULL) {
}
value = value * 5 + (p - s);
}
return value;
}
int main()
{
char str[5];
int i;
i = quin2dec(str);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCmludCBxdWluMmRlYyhjaGFyICpzdHIpCnsKCWludAlpLCB2YWx1ZSA9IDA7CgljaGFyCXNbXSA9ICJyaGZteSI7CgljaGFyCSpwOwoKCWZvciAoaSA9IDA7IGkgPCA0OyBpKyspIHsKCQlpZiAoc3RyW2ldID09ICdcMCcpIHsKCQkJYnJlYWs7CgkJfQoJCXAgPSBzdHJjaHIocywgc3RyW2ldKTsKCQlpZiAocCA9PSBOVUxMKSB7CgkJCWZwcmludGYoc3RkZXJyLCAiZXJyb3JcbiIpOwoJCQlleGl0KDEpOwoJCX0KCQl2YWx1ZSA9IHZhbHVlICogNSArIChwIC0gcyk7Cgl9CglyZXR1cm4gdmFsdWU7Cn0KCmludCBtYWluKCkKewoJY2hhcglzdHJbNV07CglpbnQJaTsKCglzY2FuZigiJTRzIiwgc3RyKTsKCWkgPSBxdWluMmRlYyhzdHIpOwoJcHJpbnRmKCIlZFxuIiwgaSk7CglyZXR1cm4gMDsKfQo=