《杭电计算机笔试题》由会员分享,可在线阅读,更多相关《杭电计算机笔试题(2页珍藏版)》请在金锄头文库上搜索。
1、杭电计算机笔试题 第一题是:一个长整型的数,从低位起取出奇数位组成一个新的数输出 第二题是杭电acm1002题 A+BProblemII ProblemDescription Ihaveaverysimpleproblemforyou.GiventwointegersAandB,yourjobistocalculatetheSumofA+B. Input ThefirstlineoftheinputcontainsanintegerT(1=T=20)whichmeansthenumberoftestcases.ThenTlinesfollow,eachlineconsistsoftwoposi
2、tiveintegers,AandB.Noticethattheintegersareverylarge,thatmeansyoushouldnotprocessthembyusing32bitinteger.Youmayassumethelengthofeachintegerwillnotexceed1000. Output Foreachtestcase,youshouldoutputtwolines.ThefirstlineisCase:,meansthenumberofthetestcase.ThesecondlineistheanequationA+B=Sum,SummeanstheresultofA+B.Notetherearesomespacesinttheequation.Outputablanklinebetweentwotestcases. SampleInput 2 12 112233445566778899998877665544332211 SampleOutput Case1: 1+2=3 Case2: 112233445566778899+998877665544332211=1111111111111111110