描述
One of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbers.
``This supercomputer is great,'' remarked Chip. ``I only wish Timothy were here to see these results.'' (Chip moved to a new apartment, once one became available on the third floor of the Lemon Sky apartments on Third Street.)
输入
The input will consist of at most 100 lines of text, each of which contains a single VeryLongInteger. Each VeryLongInteger will be 100 or fewer characters in length, and will only contain digits (no VeryLongInteger will be negative).
The final input line will contain a single zero on a line by itself.
输出
Your program should output the sum of the VeryLongIntegers given in the input.
样例输入
123456789012345678901234567890
123456789012345678901234567890
123456789012345678901234567890
0
样例输出
370370367037037036703703703670
提示
注意输入数据中,VeryLongInteger 可能有前导0
分析:
大数加法运算。此题为连续加法。
分享到:
相关推荐
谭浩强C++程序设计-习题程序。C++程序设计课后练习的习题程序答案,谭浩强主编。
C++小程序---打字练习游戏;简单的小游戏
《Visual C++程序开发-范例宝典第2版》是2009年出版,《Visual C++程序开发-范例宝典》(即第1版)是2007年出版。以前同事有这本书,是第1版的,当时稍稍看了下,觉得挺震撼,实例几百个。最近要用到MFC、C++来做...
warning: gcc-c++-4.4.7-3.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY error: Failed dependencies: gcc = 4.4.7-3.el6 is needed by gcc-c++-4.4.7-3.el6.x86_64 libstdc++ = 4.4.7-...
c++高精度---加法(csdn)————程序
C++练习题C++练习题C++练习题C++练习题C++练习题C++练习题C++练习题C++练习题C++练习题C++练习题C++练习题C++练习题
C++期末复习--2.练习题-填空.doc
C++语言程序设计综合练习题 程序设计题 1. 利用递归函数求24与16的最大公约数。 2. 输入三角形的三边长 a,b,c,输出三角形的面积s。求面积的公式为: s=sqrt(L* (L-a)*(L- b)*(L-c)),其中L=(a+b+c)/2。 3. &&...
学c初级者推荐去看,对于今后编程和课设很有帮助·~~
本文档适合广大的一线教师及有需要的C++小白,有需要的拿去,不谢!
C++基础与深度解析--peoject2 长整数加法(csdn)————程序
《C++程序设计》考试-阅读程序题.pdf
gcc-c++-3.4.6-3.1.x86_64.rpm
C++语言程序设计_郑莉_课后习题答案
本资源为C++学者入门实用资料,C++编程练习题大全(带答案),转自网络,知识共享,版权归原创所有
windows下c++版faster -rcnn