for x in itertools.product([-5,0,5,10],[-0.5,0,0.5,1],range(20,71,25)): print (x,x[0]-(math.ceil(x[2]/10)*x[1]))
(-5, -0.5, 20) -4.0
(-5, -0.5, 45) -2.5
(-5, -0.5, 70) -1.5
(-5, 0, 20) -5
(-5, 0, 45) -5
(-5, 0, 70) -5
(-5, 0.5, 20) -6.0
(-5, 0.5, 45) -7.5
(-5, 0.5, 70) -8.5
(-5, 1, 20) -7
(-5, 1, 45) -10
(-5, 1, 70) -12
(0, -0.5, 20) 1.0
(0, -0.5, 45) 2.5
(0, -0.5, 70) 3.5
(0, 0, 20) 0
(0, 0, 45) 0
(0, 0, 70) 0
(0, 0.5, 20) -1.0
(0, 0.5, 45) -2.5
(0, 0.5, 70) -3.5
(0, 1, 20) -2
(0, 1, 45) -5
(0, 1, 70) -7
(5, -0.5, 20) 6.0
(5, -0.5, 45) 7.5
(5, -0.5, 70) 8.5
(5, 0, 20) 5
(5, 0, 45) 5
(5, 0, 70) 5
(5, 0.5, 20) 4.0
(5, 0.5, 45) 2.5
(5, 0.5, 70) 1.5
(5, 1, 20) 3
(5, 1, 45) 0
(5, 1, 70) -2
(10, -0.5, 20) 11.0
(10, -0.5, 45) 12.5
(10, -0.5, 70) 13.5
(10, 0, 20) 10
(10, 0, 45) 10
(10, 0, 70) 10
(10, 0.5, 20) 9.0
(10, 0.5, 45) 7.5
(10, 0.5, 70) 6.5
(10, 1, 20) 8
(10, 1, 45) 5
(10, 1, 70) 3