Integer Inquiry【大数的加法举例】
|
Integer Inquiry
Description 题目链接:http://poj.org/problem?id=1503 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.
Sample Input 123456789012345678901234567890 Sample Output 370370367037037036703703703670 Source 题目描述:输入多个大数,求其和,输入以0结束。
代码:
#include<iostream> |
Integer Inquiry【大数的加法举例】的更多相关文章
- Integer Inquiry 大数加法
Integer Inquiry 1 import java.util.*; 2 import java.math.*; 3 import java.io.*; 4 import java.text.* ...
- hdu acm-1047 Integer Inquiry(大数相加)
Integer Inquiry Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)T ...
- POJ 1503 Integer Inquiry(大数相加,java)
题目 我要开始练习一些java的简单编程了^v^ import java.io.*; import java.util.*; import java.math.*; public class Main ...
- POJ 1503 Integer Inquiry(大数相加)
一.Description One of the first users of BIT's new supercomputer was Chip Diller. He extended his exp ...
- HDU 1047 Integer Inquiry 大数相加 string解法
本题就是大数相加,题目都不用看了. 只是注意的就是HDU的肯爹输出,好几次presentation error了. 还有个特殊情况,就是会有空数据的输入case. #include <stdio ...
- POJ 1503 Integer Inquiry 大数 难度:0
题目链接:http://poj.org/problem?id=1503 import java.io.*; import java.math.BigInteger; import java.util. ...
- Integer Inquiry(大数相加)
Description One of the first users of BIT's new supercomputer was Chip Diller. He extended his explo ...
- HDU 1047 Integer Inquiry( 高精度加法水 )
链接:传送门 思路:高精度水题 /************************************************************************* > File ...
- UVa 424 Integer Inquiry 【大数相加】
解题思路:因为给定的数据是多组,所以我们只需要多次做加法就可以了,将上一次的和又作为下一次加法运算的一个加数. 反思:还是题意理解不够清楚,最开始以为只是算三个大数相加,后来才发现是多个,然后注意到当 ...
随机推荐
- am335x UART1输入u-boot 调试信息代码修改
AM335x 调试信息UART1输出代码修改1. 关于pin_mux 的配置代码修改位置:/board/forlinx/ok335x/mux.c void enable_uart0_pin_mux( ...
- python字符串函数
- Python自动化之rabbitmq rpc client端代码分析(原创)
RPC调用client端解析 import pika import uuid # 建立连接 class FibonacciRpcClient(object): def __init__(self): ...
- phpcms不显示验证码
只需修改./caches/configs/system.php即可 1.本地域名如果是 http://localhost 如果所有的文件都在根目录下(例如apache下的htdocs或www),此时, ...
- neutron 同一虚拟网卡的多个IP设置
neutron port-update <端口ID> --fixed-ip subnet_id=<子网ID/子网名>,ip_address=<IP地址> --fix ...
- 【SpringBoot】SpringBoot 入门示例
参考资料: http://www.tuicool.com/articles/mqeee2A http://www.cnblogs.com/suncj/p/4065589.html http://spr ...
- git rebase简介(高级篇)
原文:http://gitbook.liuhui998.com/4_3.html 一.基本 对于git rebase,你亦可以选择进行交互式的rebase.这种方法通常用于在向别处推送提交之前对它 ...
- select count(*)和select count(1)的区别
一般情况下,Select Count (*)和Select Count(1)两着返回结果是一样的 假如表沒有主键(Primary key), 那么count(1)比count(*)快, 如果有主键的話 ...
- Java中对List集合内的元素进行顺序、倒序、随机排序的示例代码
import java.util.Collections; import java.util.LinkedList; import java.util.List; public class Test ...
- 彻底卸载MySql
刚装了下MySql,装的过程中由于修改了服务名,导致最后配置假死,不得已,重装. 但是重装时总是失败,于是google了一下,找到彻底卸载mysql的方法: 最近安装本地测试用 MySQL 服务器时总 ...