question )
https://hack.codingblocks.com/app/practice/3/1039/problem
my answer ) https://ide.codingblocks.com/s/246942
question )
https://hack.codingblocks.com/app/practice/3/1039/problem
my answer ) https://ide.codingblocks.com/s/246942
hello @N4i9kita
a) 
use long long in place of int to avoid overlfow
b) 
store cumullative sum before this loop and use that sum to answer each query in o(1).
refer this video tutorial by prateek bhaiya-> https://www.youtube.com/watch?v=8sniiDbfPK4