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

Envío 3034

Problema 0x78 - Suma de 2 números

  • Autor: juanboterog
  • Fecha: 2021-02-15 21:25:27 UTC (Hace alrededor de 3 años)
Caso # Resultado Tiempo Memoria
#1
Incorrecto
0.153 s 47 KBi
#2
Incorrecto
0.17 s 15 KBi
#3
Incorrecto
0.152 s 16 KBi
#4
Incorrecto
0.171 s 16 KBi
#5
Incorrecto
0.159 s 16 KBi
Puntos totales: 0 / 100

Código

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner myInput = new Scanner(System.in);

        System.out.println("Enter two numbers separated by space: ");
        String input = myInput.nextLine();
        String[] numbers = input.split(" ");
        if (numbers.length == 2) {
            System.out.println(Integer.valueOf(numbers[0]) + Integer.valueOf(numbers[1]));
        }
    }
}