Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
main.c:2:1: error: unknown type name 'import' import java.util.Scanner; ^ main.c:2:12: error: expected ';' after top level declarator import java.util.Scanner; ^ ; main.c:4:1: error: unknown type name 'public' public class Suma2Num { ^ main.c:4:13: error: expected ';' after top level declarator public class Suma2Num { ^ ; 4 errors generated. |
||
#2 |
Error de compilación
main.c:2:1: error: unknown type name 'import' import java.util.Scanner; ^ main.c:2:12: error: expected ';' after top level declarator import java.util.Scanner; ^ ; main.c:4:1: error: unknown type name 'public' public class Suma2Num { ^ main.c:4:13: error: expected ';' after top level declarator public class Suma2Num { ^ ; 4 errors generated. |
||
#3 |
Error de compilación
main.c:2:1: error: unknown type name 'import' import java.util.Scanner; ^ main.c:2:12: error: expected ';' after top level declarator import java.util.Scanner; ^ ; main.c:4:1: error: unknown type name 'public' public class Suma2Num { ^ main.c:4:13: error: expected ';' after top level declarator public class Suma2Num { ^ ; 4 errors generated. |
||
#4 |
Error de compilación
main.c:2:1: error: unknown type name 'import' import java.util.Scanner; ^ main.c:2:12: error: expected ';' after top level declarator import java.util.Scanner; ^ ; main.c:4:1: error: unknown type name 'public' public class Suma2Num { ^ main.c:4:13: error: expected ';' after top level declarator public class Suma2Num { ^ ; 4 errors generated. |
||
#5 |
Error de compilación
main.c:2:1: error: unknown type name 'import' import java.util.Scanner; ^ main.c:2:12: error: expected ';' after top level declarator import java.util.Scanner; ^ ; main.c:4:1: error: unknown type name 'public' public class Suma2Num { ^ main.c:4:13: error: expected ';' after top level declarator public class Suma2Num { ^ ; 4 errors generated. |
import java.util.Scanner; public class Suma2Num { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int suma = a + b; System.out.println(suma); } }