I don't understand why I got an error in test 3

Правка en1, от yull23, 2021-09-25 18:34:50

Good morning, someone knows the reason why it does not recognize python 3, it only recognizes python 2, and I always get an error when sending my code, I attach shipping images, the problem is my code

problem: https://codeforces.com/contest/1176/problem/B send: https://codeforces.com/contest/1176/submission/129864181

thanks.

input: 2 5 3 1 2 3 1 7 1 1 1 1 1 2 2

code:

Para el conteo de datos

def count(x): k = 0 for i in x: if i % 3 == 0: k = k + 1 return k

def mx(x): n = [] for i in x: n.append(i % 3) x0 = n.count(0) x1 = n.count(1) x2 = n.count(2) if x1 < x2: x0 = x0 + x1 + (x2 — x1) * 2 // 3 elif x1 > x2: x0 = x0 + x2 + (x1 — x2) // 3 else: x0 = x0 return x0

num = int(input()) f = [] for i in range(num): num2 = input() y = list(map(int, input().split())) f.append(mx(y)) for i in f: print(i)

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский yull23 2021-09-25 18:34:50 1039 Revisión inicial (published)