POJ 1503】的更多相关文章

http://poj.org/problem?id=1503 对于这个题我也是醉了,因为最开始是有学长和我们说过这个题目的,我以为我记得题目是什么意思,也就没看题目,结果按案例去理解题意,结果WA了一晚上,我也是醉醉哒. 最后今天才在discuss发现是我的理解题意错了,改下,就对了.给我一个很大的教训..... 题意很简单,,就是一组大整数的加法而已,终止的标志就是只有一个0输入. #include <stdio.h> #include <string.h> ]={}; ]={}…
题目链接:http://poj.org/problem?id=1503 import java.io.*; import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String []args) throws IOException{ Scanner scanner=new Scanner(System.in); BigInteger a=BigIntege…
1.链接地址: http://poj.org/problem?id=1503 2.题目: Integer Inquiry Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 28115   Accepted: 10925 Description One of the first users of BIT's new supercomputer was Chip Diller. He extended his explorati…
题目链接:http://poj.org/problem?id=1503 思路分析: 基本的高精度问题,使用字符数组存储然后处理即可. 代码如下: #include <iostream> #include <string> using namespace std; + ; char input[M]; int A[M], sum[M]; void Reverse(int A[], const char str[]) { int len = strlen(str); ; ; i >…
一.Description 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…
题目 我要开始练习一些java的简单编程了^v^ import java.io.*; import java.util.*; import java.math.*; public class Main { /** * @param args */ public static void main(String[] args) throws Exception { // 定义并打开输入文件 Scanner cin = new Scanner(System.in); BigInteger a, sum…
Description 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 wi…
代码: import java.math.*; import java.util.Scanner; public class Main { public static void main(String args[]){ Scanner cin = new Scanner(System.in); BigInteger sum,a; sum = BigInteger.valueOf(0); while(true){ a = cin.nextBigInteger(); if(a.equals(BigI…
之前做的大整数,都是一位一位操作. 优化方案:压缩方案. 模板: + - *  操作符重载 #include<cstdio> #include<iostream> #include<cmath> #include<algorithm> #include<cstring> #include<string> #include<vector> using namespace std; struct bigint{ // only…
把输入的数加起来,输入0表示结束. 先看我Java代码,用BigINteger类很多东西都不需要考虑,比如前导0什么的,很方便.不过java效率低点,平均用时600ms,C/C++可以0ms过. import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in)…