fork(1) download
  1. for _ in range(8):
  2. x=0,
  3. for n in input():x=[t-n+1for t in x]+[n*len(x)]
  4. print x
Success #stdin #stdout 0s 9032KB
stdin
0, 0, 0
0, 0, 1
0, 1, 0
0, 1, 1
1, 0, 0
1, 0, 1
1, 1, 0
1, 1, 1
stdout
[3, 2, 1, 0]
[2, 1, 0, 3]
[2, 1, 3, 0]
[1, 0, 2, 3]
[2, 3, 1, 0]
[1, 2, 0, 3]
[1, 2, 3, 0]
[0, 1, 2, 3]