TOPIC

runtime error

Luisa16 asked 3 years ago

pessoal, fica dando runtime error no meu codigo em python ... alguem poderia me ajudar?

include

using namespace std;

int main() {

t = int(input()) while t > 0: t -= 1 n = int(input()) c = [int(x) for x in input().split()] print(len(set(c)))

return 0;

}

Remember not post solutions. Your post may be reviewed by our moderators.

  • josean replied 3 years ago

    você está confundindo c++ com python, seu código tem sintaxe de ambos. Em python os blocos não são separados por {} mas por indentação do código.

    t = int(input()) 
    while t > 0: 
      t -= 1 
      n = int(input()) 
      c = [int(x) for x in input().split()] 
      print(len(set(c)))