fork download
  1. import java.util.Scanner;
  2. import java.math.BigInteger;
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. Scanner scan = new Scanner(System.in);
  9. int n = scan.nextInt();
  10. scan.nextLine();
  11. while(n-- > 0){
  12. String s = scan.nextLine();
  13. int k = s.indexOf('+');
  14. System.out.println(new BigInteger(s.substring(0, k)).add(new BigInteger(s.substring(k+1))));
  15. }
  16. }
  17. }
Success #stdin #stdout 0.06s 2184192KB
stdin
1
231+23123
stdout
23354