You are viewing a single comment's thread. Return to all comments →
when my input is same i get right ans and then a zero
eg: 2 1000 1 1000 1
any idea why? thanks
Check if you initialize all the variables again in the second set, or there is some value that you keep between loops.