HDU/2055/main.c
Saturneric 0525ffad24 Add.
2020-09-01 00:48:58 +08:00

19 lines
284 B
C

#include <stdio.h>
int main(void){
int numbers,i;
scanf("%d",&numbers);
for(i = 0; i < numbers; i++){
char ch[2];
int y;
scanf("%s %d",ch,&y);
if(ch[0] >= 'A' && ch[0] <= 'Z'){
printf("%d\n",ch[0]-64+y);
}
else{
printf("%d\n",(-ch[0])+96+y);
}
}
return 0;
}