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

Envío 5803

Problema 0x78 - Suma de 2 números

  • Autor: DanielP
  • Fecha: 2022-03-02 02:00:32 UTC (Hace casi 3 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.c:1:1: error: unknown type name 'var'
var input = readline();
^
main.c:1:13: warning: implicit declaration of function 'readline' is invalid in C99 [-Wimplicit-function-declaration]
var input = readline();
            ^
main.c:2:5: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    a = Number(input.split(" ")[0]);
    ^
main.c:2:9: warning: implicit declaration of function 'Number' is invalid in C99 [-Wimplicit-function-declaration]
    a = Number(input.split(" ")[0]);
        ^
main.c:3:5: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    b = Number(input.split(" ")[1]);
    ^
main.c:4:5: error: unknown type name 'Console'
    Console.log(a + b);
    ^
main.c:4:12: error: expected identifier or '('
    Console.log(a + b);
           ^
4 warnings and 3 errors generated.

                    
#2
Error de compilación
                      main.c:1:1: error: unknown type name 'var'
var input = readline();
^
main.c:1:13: warning: implicit declaration of function 'readline' is invalid in C99 [-Wimplicit-function-declaration]
var input = readline();
            ^
main.c:2:5: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    a = Number(input.split(" ")[0]);
    ^
main.c:2:9: warning: implicit declaration of function 'Number' is invalid in C99 [-Wimplicit-function-declaration]
    a = Number(input.split(" ")[0]);
        ^
main.c:3:5: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    b = Number(input.split(" ")[1]);
    ^
main.c:4:5: error: unknown type name 'Console'
    Console.log(a + b);
    ^
main.c:4:12: error: expected identifier or '('
    Console.log(a + b);
           ^
4 warnings and 3 errors generated.

                    
#3
Error de compilación
                      main.c:1:1: error: unknown type name 'var'
var input = readline();
^
main.c:1:13: warning: implicit declaration of function 'readline' is invalid in C99 [-Wimplicit-function-declaration]
var input = readline();
            ^
main.c:2:5: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    a = Number(input.split(" ")[0]);
    ^
main.c:2:9: warning: implicit declaration of function 'Number' is invalid in C99 [-Wimplicit-function-declaration]
    a = Number(input.split(" ")[0]);
        ^
main.c:3:5: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    b = Number(input.split(" ")[1]);
    ^
main.c:4:5: error: unknown type name 'Console'
    Console.log(a + b);
    ^
main.c:4:12: error: expected identifier or '('
    Console.log(a + b);
           ^
4 warnings and 3 errors generated.

                    
#4
Error de compilación
                      main.c:1:1: error: unknown type name 'var'
var input = readline();
^
main.c:1:13: warning: implicit declaration of function 'readline' is invalid in C99 [-Wimplicit-function-declaration]
var input = readline();
            ^
main.c:2:5: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    a = Number(input.split(" ")[0]);
    ^
main.c:2:9: warning: implicit declaration of function 'Number' is invalid in C99 [-Wimplicit-function-declaration]
    a = Number(input.split(" ")[0]);
        ^
main.c:3:5: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    b = Number(input.split(" ")[1]);
    ^
main.c:4:5: error: unknown type name 'Console'
    Console.log(a + b);
    ^
main.c:4:12: error: expected identifier or '('
    Console.log(a + b);
           ^
4 warnings and 3 errors generated.

                    
#5
Error de compilación
                      main.c:1:1: error: unknown type name 'var'
var input = readline();
^
main.c:1:13: warning: implicit declaration of function 'readline' is invalid in C99 [-Wimplicit-function-declaration]
var input = readline();
            ^
main.c:2:5: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    a = Number(input.split(" ")[0]);
    ^
main.c:2:9: warning: implicit declaration of function 'Number' is invalid in C99 [-Wimplicit-function-declaration]
    a = Number(input.split(" ")[0]);
        ^
main.c:3:5: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    b = Number(input.split(" ")[1]);
    ^
main.c:4:5: error: unknown type name 'Console'
    Console.log(a + b);
    ^
main.c:4:12: error: expected identifier or '('
    Console.log(a + b);
           ^
4 warnings and 3 errors generated.

                    
Puntos totales: 0 / 100

Código

var input = readline();
    a = Number(input.split(" ")[0]);
    b = Number(input.split(" ")[1]);
    Console.log(a + b);