zoj 1292
来源:互联网 发布:php兄弟连 编辑:程序博客网 时间:2024/04/30 23:11
Integer Inquiry
Time Limit: 1 Second Memory Limit: 32768 KB
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.)
Input
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.
Output
Your program should output the sum of the VeryLongIntegers given in the input.
This problem contains multiple test cases!
The first line of a multiple input is an integer N, then a blank line followed by N input blocks. Each input block is in the format indicated in the problem description. There is a blank line between input blocks.
The output format consists of N output blocks. There is a blank line between output blocks.
Sample Input
1
123456789012345678901234567890
123456789012345678901234567890
123456789012345678901234567890
0
Sample Output
370370367037037036703703703670
Source: East Central North America 1996
这道题没有什么难度,又是一道高精度的题,想总结这道题的原因就是,高精度的题目挺多的,然后就是因为我犯了一些超低级错误,居然将str1='1'+str1; 写成了str1+='1'; 害我提交了很多次,都WA,无语了。。。。。
我的代码:
- zoj 1292
- zoj 1292
- ZOJ-1292
- ZOJ 1292 Integer Inquiry
- ZOJ 1292 Integer Inquiry
- zoj 1292 Integer Inquiry
- ZOJ 1292 大数相加
- ZOJ 1292 Integer Inquiry
- ZOJ 1292 Integer Inquiry
- zoj 1292 Integer Inquiry
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- const常量、指向常量的指针和常量指针
- s3c2440的触摸屏校正与测试
- 关于电子支付系统的数据库设计
- C++读写注册表的参考网址
- 搞定烦人的“decompressionEnabled”错误
- zoj 1292
- ubuntu中ibus无法调整输入法
- wcf配置详解
- 软件开发的主要技术依据,设计遵循的原则
- 2.4基于虚拟机的Linux内核编译
- jquery:Fix Table Header
- Custom Search Result Style Based On SharePoint Xslt Search Result Style
- 开放平台的技术问题
- GIS可以做什么