█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 3775

Problema 0x78 - Suma de 2 números

  • Autor: asadoenolla
  • Fecha: 2021-04-13 23:53:30 UTC (Hace alrededor de 3 años)
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
Puntos totales: 100 / 100

Código

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();
		
	}
}