why am i getting a runtime error ??
problem page:-http://www.codechef.com/problems/RRSUM/
my solution:-http://www.codechef.com/viewsolution/4598396
why am i getting a runtime error ??
problem page:-http://www.codechef.com/problems/RRSUM/
my solution:-http://www.codechef.com/viewsolution/4598396
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
thnx man for pointing it to mathematicis