You are viewing a single comment's thread. Return to all comments →
import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); BigInteger a = scanner.nextBigInteger(), b = scanner.nextBigInteger(); if((a.compareTo(BigInteger.valueOf(0)) >= 0) && (b.compareTo(BigInteger.valueOf(0)) >= 0) && ((a.toString().length()<=200) && (b.toString().length()<=200))) { System.out.println(a.add(b)); System.out.println(a.multiply(b)); } scanner.close(); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Java BigInteger
You are viewing a single comment's thread. Return to all comments →