poj2389(java大整数相乘)
来源:互联网 发布:js 新建 jsonarray 编辑:程序博客网 时间:2024/05/16 12:59
Bull Math
Time Limit: 1000MS Memory Limit: 65536KTotal Submissions:15480 Accepted: 7941
Description
Bulls are so much better at math than the cows. They can multiply huge integers together and get perfectly precise answers ... or so they say. Farmer John wonders if their answers are correct. Help him check the bulls' answers. Read in two positive integers (no more than 40 digits each) and compute their product. Output it as a normal number (with no extra leading zeros).
FJ asks that you do this yourself; don't use a special library function for the multiplication.
FJ asks that you do this yourself; don't use a special library function for the multiplication.
Input
* Lines 1..2: Each line contains a single decimal number.
Output
* Line 1: The exact product of the two input lines
Sample Input
111111111111111111111111
Sample Output
12345679011110987654321
Source
USACO 2004 November
import java.math.BigInteger;import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner cin = new Scanner(System.in);BigInteger a = cin.nextBigInteger();BigInteger b = cin.nextBigInteger();a = a.multiply(b);System.out.println(a);}}
阅读全文
0 0
- poj2389(java大整数相乘)
- poj2389 大整数乘法
- Java实现大整数相乘
- 大整数相乘------java实现
- 大整数相乘(aijud)
- 大整数相乘(分治)
- 分治算法-大整数相乘(JAVA实现)
- Java任意两个大整数相乘
- 大整数相乘算法-Java实现
- java程序计算两个大整数相乘
- poj2389 大数相乘
- 大数相乘 poj2389
- POJ2389大数相乘
- 大数相乘 POJ2389
- 大整数相乘问题
- 大整数相乘算法
- 大整数相乘算法!
- 大整数相乘
- wireshark解析NB-IoT注网流程
- 2.结构体以及结构体赋值的两种常用方式
- 欢迎使用CSDN-markdown编辑器
- HDOJ1038 Biker's Trip Odometer
- vuex核心API使用用例
- poj2389(java大整数相乘)
- hduoj 3949: XOR(线性基)
- 自顶向下,逐步求精
- C语言 HELLO WORLD 分析
- MacOS下不使用NTFSforMac向外拷东西的方法
- mysql索引无效的几种用法
- 【Linux】Shell 编程一(初始 Shell)
- Excel在统计分析中的应用—第八章—假设检验-总体方差未知且为小样本下的检验-等方差双样本的t检验
- Tomcat:The selected server is enabled 异常解决办法