我的-----------------------------
#include<stdio.h>
int main(){
int n;
char a;
int b;
scanf("%d",&n);
getchar();
while(n--)
{
scanf("%c",&a);
getchar();
scanf("%d",&b);
getchar();
if('A'<=a&&a<='Z')
{
a=a-64;
}
if('a'<=a&&a<='z')
{
a=a-96;
a=-a;
}
b=b+a;
printf("%d\n",b);
}
return 0;
}
----------------苏妞妞的
# include <stdio.h>
# include <math.h>
int main ()
{
int T, num ;
char ch ;
scanf ("%d%*c", &T) ;
while (T--)
{
scanf ("%c %d%*c", &ch, &num) ;
if (ch >= 'a' && ch <= 'z')
num -= (ch-'a'+1) ;
else
num += (ch-'A'+1) ;
printf ("%d\n", num) ;
}
return 0 ;
}