fork(6) download
  1. for _ in range(9):
  2. a,=b,=r={0}
  3. for x,y in zip(*input()):a+=x;b+=y;r|={cmp(a,b)}
  4. print sum(r)
Success #stdin #stdout 0.01s 8976KB
stdin
[255],         [254]
[3,2,1],       [3,1,2]
[6,1,5,2,7],   [2,5,4,3,7]
[9,1],         [10,0]
[6,5,4],       [7,6,5]
[0,1,1,2,1,2], [0,1,2,1,2,1]
[200,100],     [150,250]
[3,1,4],       [2,3,3]
[9,9,9,9,9,0], [8,8,8,8,8,9]
stdout
1
1
1
-1
-1
-1
0
0
0