diff options
Diffstat (limited to 'flipper.py')
-rwxr-xr-x | flipper.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -12,9 +12,14 @@ def flip(x, y): return mem[x][y] with open(argv[1]) as f: - for line in f.readlines(): + lines = f.readlines() + +while True: + for line in lines: l = list(map(int, line.split())) x = l[0] for i in range(1, len(l)): x = flip(x, l[i]) print(x) + if 0 not in mem[0] or mem[0][0] == 0: + exit() |