Scanner cin = new Scanner(new BufferedInputStream(System.in)); 这样定义Scanner类的对象读入数据可能会快一些! 参考这个博客继续补充内容:http://blog.csdn.net/lmyclever/article/details/6408980 1. 单元变量常用大数操作: import java.util.Scanner; import java.math.*; public class Main{ public stati…
题目链接:http://poj.org/problem?id=2389 题目大意: 大数相乘. 解题思路: java BigInteger类解决 o.0 AC Code: import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.h…
题目链接:http://lightoj.com/volume_showproblem.php?problem=1214 用java写大数果然是方便多了! import java.math.BigInteger; import java.util.*; import java.io.*; public class Main{ public static void main(String[] args){ Scanner cin = new Scanner(System.in); int n = c…