At first look this problem seems very easy,But it is very tough to get Acc with the formula given in problem statement
(At least for lots of people, i submitted a number of time using data type int/long long/double but couldn't get Acc ).So the best way is to use Horner's rule
(I got Acc at first try)
. Here is the Horner's rule-
- Code: Select all
I think the stupid(not always
) pow() function is responsible for this.