for(_)in open(0):print(min(ord(_[0])*2-129+~-int(_[1:])//15,7))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page