A + B Problem II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 230395 Accepted Submission(s): 44208 Problem Description I have a very simple problem for you. Given two integers A and B, you…
字串数 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2661 Accepted Submission(s): 606 Problem Description 一个A和两个B一共可以组成三种字符串:"ABB","BAB","BBA". 给定若干字母和它们相应的个数,计算一共可以组…
两个字符串表示两个非常大的数,请设计算法计算这两个大数的乘积,结果用字符串表示.例如S1="7832974972840919321747983209327",S2="1987432091904327543957",设计算法计算出S1*S2的结果,结果用String输出,不准用BigInter. 思路: 根据手工计算两数相乘的过程,用代码实现这个过程. 代码: import java.util.Scanner; public class DaZhengShuCheng…
大明A+B Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8483 Accepted Submission(s): 3000 Problem Description 话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫“大明”.这时他已经不是那个只会做100以内加法的那个“小明”了,现在他甚至会任意长度的正小数的加法. 现在,…
Train Problem II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5372 Accepted Submission(s): 2911 Problem Description As we all know the Train Problem I, the boss of the Ignatius Train Stati…
代码: 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…
Description Jiajia and Wind have a very cute daughter called Autumn. She is so clever that she can do integer additions when she was just 2 years old! Since a lot of people suspect that Autumn may make mistakes, please write a program to prove that A…