PS:上课的时候敲的..这道题简单..一次AC,不多说了..

代码:

#include "stdio.h"
int main(){
 int i,n,y;
 char x,a[26],b[26],a1='A',a2='a';
 scanf("%d",&n);
 for(i=0;i<26;i++){
  a[i]=a1++;
  b[i]=a2++;
 }
 while(n--){
  getchar();
  scanf("%c%d",&x,&y);
  if(x<='Z' && 'A'<=x){
    for(i=0;i<26;i++){
     if(x==a[i]) break;
    }
    printf("%d\n",i+1+y);
  }
  else{
   for(i=0;i<26;i++){
    if(x==b[i]) break;
   }
   i=-i;
   printf("%d\n",i-1+y);
  }
 }
 return 0;
}

hdu 2055的更多相关文章

  1. hdu 2055 An easy problem (java)

    问题: 開始尝试用字符做数组元素.可是并没实用. 在推断语句时把a z排出了. An easy problem Time Limit: 1000/1000 MS (Java/Others)    Me ...

  2. HDU——PKU题目分类

    HDU 模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 ...

  3. [转] HDU 题目分类

    转载来自:http://www.cppblog.com/acronix/archive/2010/09/24/127536.aspx 分类一: 基础题:1000.1001.1004.1005.1008 ...

  4. HDU ACM 题目分类

    模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 104 ...

  5. HDU 5643 King's Game 打表

    King's Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5643 Description In order to remember hi ...

  6. 转载:hdu 题目分类 (侵删)

    转载:from http://blog.csdn.net/qq_28236309/article/details/47818349 基础题:1000.1001.1004.1005.1008.1012. ...

  7. HDU 1816, POJ 2723 Get Luffy Out(2-sat)

    HDU 1816, POJ 2723 Get Luffy Out pid=1816" target="_blank" style="">题目链接 ...

  8. HDOJ 2111. Saving HDU 贪心 结构体排序

    Saving HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total ...

  9. 【HDU 3037】Saving Beans Lucas定理模板

    http://acm.hdu.edu.cn/showproblem.php?pid=3037 Lucas定理模板. 现在才写,noip滚粗前兆QAQ #include<cstdio> #i ...

随机推荐

  1. c语言数据结构:01背包问题-------动态规划

    两天的时间都在学习动态规划:小作业(01背包问题:) 数据结构老师布置的这个小作业还真是让人伤头脑,自己实在想不出来了便去网上寻找讲解,看到一篇不错的文章: http://www.cnblogs.co ...

  2. nodeschool.io 4

    ~~ MY FIRST ASYNC I/O! ~~ Write a program that uses a single asynchronous filesystem operationto rea ...

  3. \bin\sh.exe:*** Couldn't reserve space for cygwin's heap,Win32 error 0

    Git一直使用都好好的,今天git pull的时候,报了如下的错误,\bin\sh.exe:*** Couldn't reserve space for cygwin's heap,Win32 err ...

  4. python遍历目录

    os.walk() 用元组表示(dirpath, dirnames, filenames): 第一个是根路径,dirpath为str类型: 第二个是根路径中的文件夹,dirnames为list类型: ...

  5. HDU-----(4858)项目管理(模拟)

    项目管理 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submis ...

  6. C语言中static变量详解

    Static翻译出来是“静态”“静止”的意思,在C语言中的意思其实和它的本意差不多,表示“静态”或者“全局”的意思,用来修饰变量和函数.经static修饰过后的变量或者函数的作用域或者存储域会发生变化 ...

  7. Remove Duplicates from Sorted List II [LeetCode]

    Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numb ...

  8. 在VS2010中,引用了同一解决方案的另一个项目的dll,却不能正常调用(转)

    目前发现的原因是,dll的.net 版本比我的程序的高 dll用的.net 4  而程序用的.net 4 client profile 转载源:http://www.cnblogs.com/szyic ...

  9. Struts2配置拦截器,struts2加载常量时的搜索顺序

    1:struts2加载常量时的搜索顺序 1.Struts-default.xml 2.Struts-plugin.xml 3.Struts.xml 4.Struts-properties(自己创建的) ...

  10. Kids and Prizes(SGU 495)

    495. Kids and Prizes Time limit per test: 0.25 second(s)Memory limit: 262144 kilobytes input: standa ...