import math, strscans var (_, a, b) = stdin.readLine.scanTuple("$f $f") # f(x) = (x-a)(x-b) # x^3/3 -ax^2/2 -bx^2/2 +abx proc fn(x: float): auto = x ^ 3 / 3 - a * x ^ 2 / 2 - b * x ^ 2 / 2 + a * b * x echo a.fn - b.fn