fork(2) download
  1. f=lambda n,p:n-p*n-p*-~p/2
  2. for n, p in input():
  3. print (n,p),f(n,p)
Success #stdin #stdout 0.01s 9032KB
stdin
((2,3),(100,5),(42,0),(0,3),(0,0))
stdout
(2, 3) -10
(100, 5) -415
(42, 0) 42
(0, 3) -6
(0, 0) 0