Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.151 s | 14 KBi |
#2 |
Correcto
|
0.125 s | 14 KBi |
#3 |
Correcto
|
0.141 s | 41 KBi |
#4 |
Correcto
|
0.132 s | 14 KBi |
#5 |
Correcto
|
0.104 s | 17 KBi |
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String nums = sc.nextLine(); int index=0; for(int i=0; i<nums.length(); i++) { if(nums.charAt(i)==' ') { index=i; break; } } long a= Long.parseLong(nums.substring(0, index)); long b= Long.parseLong(nums.substring(index+1, nums.length())); System.out.println(a+b); sc.close(); } }