05 2013 档案
摘要:A字符串扩展题目描述Tom有些时候为了记录的方便,常常将一些连续的字符用扩展符'-'简单表示。比如abcdefg可以简写为a-g,即用起始的字符和终止字符中间加上一个扩展符'-'来表示这个字符串。但是为了处理的方便,Tom又必须将这些我们简单记法扩展成原来的字符串。很明显要是人工来做的话必定很麻烦,Tom知道计算机可以帮助他完成这个任务,但是他却不会编程,这的确让他很上火。他知道今天是山东理工大学第三届ACM校赛的日子,届时来自全校的编程爱好者都会来参加比赛,他很兴奋,因为这个困惑他良久的问题终于要被解决了。给你一个含有扩展符'-'的字符串,你的
阅读全文
摘要:#include<stdio.h>int judge(int x){ int p[110],k,i,t,num; k=0; if(x<0) { x=-x; k=1; } num=1; while(x) { p[num++]=x%10; x=x/10; } t=0; for(i=1;i<num;i++) t=t*10+p[i]; if(k) return -t; else return t;}int main(){ int n,a,b,x,y,s1,s2; scanf("%d",&n); while(n--) { scanf("%d
阅读全文
摘要:Problem DescriptionIgnatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words and then output them.InputThe input contains several test cases. The first line of the input is a single integer T which is the number of test c
阅读全文
摘要:123*123=: 1 2 3 1 2 3------------------------- 3 6 9 2 4 6 1 2 3-------------------------- 1 5 1 2 9 9=3*3;2=2*3+3*2%10;。。。。。。 1 #include<stdio.h> 2 #include<string.h> 3 #define N 50000 4 5 int main() 6 { 7 int n,m,i,j,leap,max; 8 int a[300],b[300],r[N]; 9 c...
阅读全文

浙公网安备 33010602011771号