摘要: 高精度运算,涉及加法、乘法和比大小。一不留神就写了百行,WA的原因是output没有把输入再打印一遍。不过改的时候也考虑了一下前导零,用了clean()函数。可能不考虑也能A,题里面又没说嘛。题目:OverflowOverflowWrite a program that reads an expression consisting of twonon-negative integer and an operator. Determine if either integer orthe result of the expression is too large to be represented 阅读全文
posted @ 2013-01-29 21:54 上白泽慧音 阅读(469) 评论(0) 推荐(0) 编辑
摘要: 高精度乘法题目:ProductProductThe ProblemThe problem is to multiply two integers X, Y. (0<=X,Y<10250)The InputThe input will consist of a set of pairs of lines. Each line in pair contains one multiplyer.The OutputFor each input pair of lines the output line should consist one integer the product.Sampl 阅读全文
posted @ 2013-01-29 15:34 上白泽慧音 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 一道高精度加法运算,原来做过两道相似的。不过看了书之后还是尝试用了一下模板,套用标准C还是出现了一点问题。加法函数的时候竟然会把全局定义的结构变量值清空。题目:Integer InquiryInteger InquiryOne of the first users of BIT's new supercomputer was Chip Diller. Heextended his explorationof powers of 3 to go from 0 to 333 and he explored taking various sumsof those numbers.``This 阅读全文
posted @ 2013-01-29 01:15 上白泽慧音 阅读(323) 评论(0) 推荐(0) 编辑