fork(1) download
  1. f=lambda x,y:x>[]and y.pop()+x.pop()*f(x,y)
  2.  
  3. print(f([5, 10],[4, 2]))
  4. print(f([10, 10, 4, 62, 7],[1, 2, 3, 4, 5]))
  5. print(f([5, 1, 10],[3, 0, 7]))
  6. print(f([6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [3, 1, 5, 5, 3, 0, 5, 2, 5, 4]))
Success #stdin #stdout 0.02s 9944KB
stdin
Standard input is empty
stdout
42
22167
37
33570178