You are viewing a single comment's thread. Return to all comments →
The definition of the problem is wrong.
Definition says,
sum(l...r) = p(l) + p(l+1) + ... + p(r)
But the implementation works when,
sumfunc(l...r) = p(l) + p(l+1) + ... + p(r-1)
Here the interval [l,r) is left-closed,right-opened.
[l,r)
Seems like cookies are disabled on this browser, please enable them to open this website
Xorry Queries
You are viewing a single comment's thread. Return to all comments →
The definition of the problem is wrong.
Definition says,
But the implementation works when,
Here the interval
[l,r)
is left-closed,right-opened.