sum query july cookoff

why am i getting a runtime error ??

problem page:-RRSUM Problem - CodeChef

my solution:-CodeChef: Practical coding for everyone

N <= 10^9 . You can’t have an array of that size.

do you really think array[10^9] will work?

because n can be 10^9 atmost

try to solve problem another way…hint:mathematically :smiley:

2 Likes

thnx man for pointing it to mathematicis :slight_smile: