题目链接:https://www.nowcoder.com/acm/contest/118/E
看到大数直接套JAVA,但是后面MekakuCityActors大佬和我说可以找规律(>_<),仔细想想确实可以(顺便%MekakuCityActors大佬),下面是我的java实现代码:
1 import java.math.BigInteger; 2 import java.util.Scanner; 3 4 5 public class Main { 6 public static void main(String arg[]) { 7 Scanner sc = new Scanner(System.in); 8 while(sc.hasNext()) { 9 int T = sc.nextInt(); 10 while((T--) > 0 ) { 11 BigInteger a = sc.nextBigInteger(); 12 BigInteger b = sc.nextBigInteger(); 13 System.out.println(a.multiply(b)); 14 } 15 } 16 sc.close(); 17 } 18 }