Hello, My code works locally and test completed son the judge
but i got Runtime Error on the judge, what's wrong with it please? My code bellow t = int(input()) for ii in range(t): r, c = list(map(int, input().split())) mat = [] for jj in range(r): mat.append(list(map(int, input().split()))) value = 0 nex = [0] while (len(nex) != 0): nex = [] for i in range(r): value += sum(mat[i]) tempr = mat[i] moyr = sum(mat[i]) / len([y for y in mat[i] if y != 0]) for j in range(c): if mat[i][j] != 0: tempc = [x[j] for x in mat] moyc = sum(tempc) / len([y for y in tempc if y != 0]) if mat[i][j] < moyc or mat[i][j] < moyr: if sum([tempc[x] for x in range(r) if x != i]) != 0 or sum([tempr[x] for x in range(c) if x != j]) != 0: nex.append([i, j]) for k in nex: mat[k[0]][k[1]] = 0 print('Case #{}: {}'.format(ii + 1, value)) -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-code+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/66d1375c-2f44-4483-aed6-69cdd1b11cee%40googlegroups.com.