Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.math.BigInteger;
- import java.util.Scanner;
- public class Demo {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String firstNumberStr = scanner.nextLine(); //"214124124312312"
- String secondNumberStr = scanner.nextLine(); //"3"
- BigInteger firstNumber = new BigInteger(firstNumberStr);
- BigInteger secondNumber = new BigInteger(secondNumberStr);
- System.out.println(firstNumber.multiply(secondNumber));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement