Why is my code incorrect and which testcases is it failing?

Problem Link :- CodeChef: Practical coding for everyone
Problem Code :- RANGEASSIGN
My Code:-