高精度View Code import java.util.*;import java.math.*;public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); BigInteger a = cin.nextBigInteger(); BigInteger sum = BigInteger.ZERO; while (!a.equals(BigInteger.ZERO)) { ...
转载 2013-01-18 14:22:00
50阅读
2评论
大数+++++#include#include#include#includeusing namespace std;char s[110];int dp[110];int ans[110];int num;int Tmax;void solve(){ for(int i=0...
转载 2016-06-09 22:35:00
26阅读
C - Integer InquiryCrawling in process...Crawling failedTime Limit:1000MS    Memory Limit:10000KB     64bit IO Format:%I64d & %I64uSubmitStatus Practice POJ 1503 Appoint desc
原创 2022-08-08 16:59:39
22阅读
题目意思很容易懂,明显的大数相加,但是需要注意程序会输入类似0035这样有前导0的
原创 2022-09-26 10:22:06
63阅读
#include #include #define MAXLENGTH 103char tmp[MAXLENGTH];char add1[MAXLENGTH];char add2[MAXLENGTH];char sum[
原创 2023-05-23 15:59:49
34阅读
Code #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; const int N = 128; struct bigInt{ int num[N]; // ...
转载 2021-09-18 10:01:00
40阅读
2评论
#include <iostream>#include <string>using namespace std;int compare(string str1, string str2){ while(!str1.empty()&&str1[0]=='0') { str1.erase(0,1); } while(!str2.empty()&&str2[0]=='0') { str2.erase(0,1); } if(str1.size() > str2.size()) //长度长的整数大于长度小的整数
转载 2011-07-22 20:02:00
35阅读
2评论
http://poj.org/problem?id=1503 题意:给出n个数,计算和。 思路: 基础的大整数加法题。
转载 2017-04-02 20:26:00
125阅读
2评论
把输入的数加起来,输入0表示结束。先看我Java代码,用BigINteger类很多东西都不需要考虑
原创 2022-07-18 11:37:04
51阅读
Integer InquiryTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 35569 Accepted: 13869DescriptionOne of the first users of BIT's new supercomputer was ...
原创 2021-08-25 13:43:38
144阅读
题目链接:http://poj.org/problem?id=1503 1 import java.io.*; 2 import java.math.BigInteger; 3 import java.util.Scanner; 4 5 public class Main { 6 pub...
转载 2015-07-12 01:20:00
69阅读
2评论
DescriptionOne 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
原创 2022-05-14 11:05:16
365阅读
POJ 刷题系列:1503 Integer Inquiry传送门:POJ 1503 Integer Inquiry题意: 实现VeryLongInteg
原创 2023-07-10 16:15:10
55阅读
/*_____________________________________POJ 1503题_________________________________________________ Integer Inquiry Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 18770 Accepted: 7384 Description:One of the first users of BIT's new supercomputer was Chip Diller. He ext...
转载 2011-03-18 00:15:00
55阅读
2评论
题目大意:两种水果可以杂交出一种新的水果,现在要给新水果起名字,起名的规则是:这个名字要包含之前两种水果的名字的
原创 2015-04-18 10:53:01
182阅读
package com.njupt.acm;import java.math.BigInteger;import java.util.Scanner;public class POJ_1503 { public static void main(String[] args) { Scanner scanner = new Scanner (System.in); Bi
原创 2013-11-15 21:00:38
38阅读
Integer InquiryTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 27942 Accepted: 10859DescriptionOne of the first users of BIT's new supercomputer was C
原创 2014-01-11 21:53:04
87阅读
#include#include#include#include#include#include#include#include#define INF 99999999using namespace std;const int MAX=100+10;char a[MAX],b[MAX];int dp[MAX][MAX],per[MAX][MAX];void Printf(int i,int j){ if(i+j == 0)return; if(per[i][j] == 1)Printf(i-1,j),printf("%c",a[i]); else if(per[i][j]
转载 2013-09-11 20:10:00
25阅读
思路: treap (算是基本操作吧…..) 加减的操作数很少 就暴力好啦 每回判断一下最小的数是不是比M小 如果是 就删,继续判断搞定。//By SiriusRen#include #include #include using namespace std;int n,M,...
转载 2016-12-09 16:25:00
26阅读
treap改了好长时间,erase写错了。。。 splay
转载 2016-11-26 13:12:00
54阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5