摘要: a letter and a number时间限制:3000 ms | 内存限制:65535 KB难度:1描述we define f(A) = 1, f(a) = -1, f(B) = 2, f(b) = -2, ... f(Z) = 26, f(z) = -26;Give you a letter x and a number y , you should output the result of y+f(x).输入On the first line, contains a number T(0#includeint main(){int n,m;char c;scanf("%d& 阅读全文
posted @ 2013-07-29 21:02 王莜轩 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 交换输出时间限制:3000 ms | 内存限制:65535 KB难度:1描述输入n(n#define M 100int main(){int n;int a[M+10],b;while(scanf("%d",&n)&&n!=0){int i,j;scanf("%d",&a[0]);b=a[0];for(i=1;ia[i])b=a[i];}for(i=1;i<n;i++){if(b==a[i])break;}a[i]=a[0];a[0]=b;for(i=0;i<n-1;i++)printf("%d &q 阅读全文
posted @ 2013-07-29 18:30 王莜轩 阅读(204) 评论(0) 推荐(0) 编辑
摘要: A + B Problem IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 165469 Accepted Submission(s): 31614Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. InputThe firs... 阅读全文
posted @ 2013-07-29 11:46 王莜轩 阅读(228) 评论(0) 推荐(0) 编辑