以下文章小编为您整理的九度OJ―题目1198:a+b(高精度计算),本文共4篇,供大家阅读。

篇1:九度OJ―题目1198:a+b(高精度计算)
题目描述:
实现一个加法器,使其能够输出a+b的值,
输入:输入包括两个数a和b,其中a和b的位数不超过1000位。
输出:可能有多组测试数据,对于每组数据,
输出a+b的值。
样例输入:2 610000000000000000000 10000000000000000000000000000000样例输出:
810000000000010000000000000000000来源:华中科技大学计算机研究生机试真题答疑:解题遇到问题?分享解题心得?讨论本题请访问:t.jobdu.com/thread-7921-1-1.html
#include 上一篇:www.2cto.com/kf/12/363595.html 题目描述:读入两个小于100的正整数A和B,计算A+B. 需要注意的是:A和B的每一位数字由对应的英文单词给出.输入:测试输入包含若干测试用例,每个测试用例占一行,格式为“A + B =”,相邻两字符串有一个空格间隔.当A和B同时为0时输入结束,相应的结果不要输出.输出:对每个测试用例输出1行,即A+B的值.样例输入: one + two =three four + five six =zero seven + eight nine =zero + zero = 样例输出: 39096 来源: 上一篇www.2cto.com/kf/201412/363598.html 题目描述: This time, you are supposed to find A+B where A and B are two matrices, and then count the number of zero rows and columns. The input consists of several test cases, each starts with a pair of positive integers M and N (≤10) which are the number of rows and columns of the matrices, respectively. Then 2*M lines follow, each contains N integers in [-100, 100], separated by a space. The first M lines correspond to the elements of A and the second M lines to that of B. The input is terminated by a zero M and that case must NOT be processed. For each test case you should output in one line the total number of zero rows and columns of A+B. 2 21 11 1-1 -110 92 31 2 34 5 6-1 -2 -3-4 -5 -60样例输出: 15来源:浙江大学计算机及软件工程研究生机试真题答疑: 题目描述:给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{ Ni, Ni+1, ..., Nj },其中 1 <= i <= j <= K,最大连续子序列是所有连续子序列中元素和最大的一个,例如给定序列{ -2, 11, -4, 13, -5, -2 },其最大连续子序列为{ 11, -4, 13 },最大和为20。现在增加一个要求,即还需要输出该子序列的第一个和最后一个元素。输入: 测试输入包含若干测试用例,每个测试用例占2行,第1行给出正整数K( K< 10000 ),第2行给出K个整数,中间用空格分隔。当K为0时,输入结束,该用例不被处理。 对每个测试用例,在1行里输出最大和、最大连续子序列的第一个和最后一个元素,中间用空格分隔, 如果最大连续子序列不唯一,则输出序号i和j最小的那个(如输入样例的第2、3组)。若所有K个元素都是负数,则定义其最大和为0,输出整个序列的首尾元素。 6-2 11 -4 13 -5 -210-10 1 2 3 4 -5 -23 3 7 -2165 -8 3 2 5 01103-1 -5 -23-1 0 -20样例输出: 20 11 1310 1 410 3 510 10 100 -1 -20 0 0来源:2005年浙江大学计算机及软件工程研究生机试真题答疑: 文档为doc格式篇2:九度OJ―题目1010:A + B
篇3:九度OJ―题目1001:A+B for Matrices
篇4:九度OJ―题目1011:最大连续子序列