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

Problem Link :- CodeChef | Competitive Programming | Participate & Learn
Problem Code :- RANGEASSIGN
My Code:-