Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 30th, 2012  |  syntax: Python  |  size: 0.30 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. n=int(raw_input())
  2. matriz=[]
  3. for p in range(n):
  4.         for h in range(9):
  5.                 linha=map(int,raw_input().split(" "))
  6.                 matriz.append(linha)
  7.                 for i in range(len(matriz)):
  8.                         for j in range(len(matriz[0])):
  9.                                 count+=matriz[i][j]
  10.                                         if count == 45:
  11.                                                 print "Instancia",p+1
  12.                                                 print "SIM"
  13.                                         else: