An easy problem
Total Submission(s): 22126 Accepted Submission(s): 14606
Give you a letter x and a number y , you should output the result of y+f(x).
6 R 1 P 2 G 3 r 1 p 2 g 3
19 18 10 -17 -14 -4
#include <stdio.h>
int main()
{
int T, y;
char x;
scanf("%d%*c",&T);
while (T--)
{
scanf("%c%d%*c",&x,&y);
if (x>='A'&&x<='Z')
printf ("%d\n",y+x-'A'+1);
else
printf ("%d\n",y+'z'-26-x);
}
return 0;
}
7万+



被折叠的 条评论
为什么被折叠?



