Sanju' salaray problem

Where is this code wrong. I wrote it according to prateek bhaiya.

@ashish_meher hey ashish see the constraints carefully your size is only 1000 but it should be 10^5