Advertisement
CR7CR7

mbyn

Nov 13th, 2022
898
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. import java.math.BigInteger;
  2. import java.util.Scanner;
  3.  
  4. public class Demo {
  5.     public static void main(String[] args) {
  6.         Scanner scanner = new Scanner(System.in);
  7.        
  8.         String firstNumberStr = scanner.nextLine(); //"214124124312312"
  9.         String secondNumberStr = scanner.nextLine(); //"3"
  10.         BigInteger firstNumber = new BigInteger(firstNumberStr);
  11.         BigInteger secondNumber = new BigInteger(secondNumberStr);
  12.  
  13.        
  14.         System.out.println(firstNumber.multiply(secondNumber));
  15.    }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement