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

Envío 849

Problema 0x62 - Contar elementos mayores a X en un arreglo pequeño

  • Autor: oigres
  • Fecha: 2020-09-26 04:22:41 UTC (Hace más de 3 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:6:33: error: expected ';' after top level declarator
    print([i for i in l if i>x])
                                ^
                                ;
1 warning and 2 errors generated.

                    
#2
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:6:33: error: expected ';' after top level declarator
    print([i for i in l if i>x])
                                ^
                                ;
1 warning and 2 errors generated.

                    
#3
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:6:33: error: expected ';' after top level declarator
    print([i for i in l if i>x])
                                ^
                                ;
1 warning and 2 errors generated.

                    
#4
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:6:33: error: expected ';' after top level declarator
    print([i for i in l if i>x])
                                ^
                                ;
1 warning and 2 errors generated.

                    
#5
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:6:33: error: expected ';' after top level declarator
    print([i for i in l if i>x])
                                ^
                                ;
1 warning and 2 errors generated.

                    
#6
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:6:33: error: expected ';' after top level declarator
    print([i for i in l if i>x])
                                ^
                                ;
1 warning and 2 errors generated.

                    
#7
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:6:33: error: expected ';' after top level declarator
    print([i for i in l if i>x])
                                ^
                                ;
1 warning and 2 errors generated.

                    
#8
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:6:33: error: expected ';' after top level declarator
    print([i for i in l if i>x])
                                ^
                                ;
1 warning and 2 errors generated.

                    
#9
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:6:33: error: expected ';' after top level declarator
    print([i for i in l if i>x])
                                ^
                                ;
1 warning and 2 errors generated.

                    
#10
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:6:33: error: expected ';' after top level declarator
    print([i for i in l if i>x])
                                ^
                                ;
1 warning and 2 errors generated.

                    
Puntos totales: 0 / 100

Código

n = int(input())
l = [int(x) for x in input().split()]
c = int(input())
for i in range(0, c):
    x = int(input())
    print([i for i in l if i>x])