fork(2) download
  1. f=lambda(a,b,c,d):d*2-c if d-c==b-a else d*b/a or b and d/(a/b)
  2. for test in input():
  3. print test, f(test)
Success #stdin #stdout 0.01s 9032KB
stdin
[[14, 24, 34, 44], [105, 45, -15, -75], [5, 25, 125, 625], [256, 64, 16, 4],[-6, -18, -54, -162],[261,65,16,4], [325, 81, 20, 5], [1, 0, 0, 0],[2, 1, 0, 0], [1, 1, 1, 1], [0, 0, 0, 0], [-325, -82, -21, -6], [325,-82,20,-5]]
stdout
[14, 24, 34, 44] 54
[105, 45, -15, -75] -135
[5, 25, 125, 625] 3125
[256, 64, 16, 4] 1
[-6, -18, -54, -162] -486
[261, 65, 16, 4] 1
[325, 81, 20, 5] 1
[1, 0, 0, 0] 0
[2, 1, 0, 0] 0
[1, 1, 1, 1] 1
[0, 0, 0, 0] 0
[-325, -82, -21, -6] -2
[325, -82, 20, -5] 1