Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.169 s | 14 KBi |
#2 |
Correcto
|
0.171 s | 13 KBi |
#3 |
Correcto
|
0.138 s | 14 KBi |
#4 |
Correcto
|
0.162 s | 54 KBi |
#5 |
Correcto
|
0.151 s | 14 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); } }