Why wrong?

Problem name: Rectangular Queries (CodeChef: Practical coding for everyone). I have tried to solve this problem with the concept of prefix sum but it is showing me wrong answer (my code: CodeChef: Practical coding for everyone) . I don’t know why that’s happening . Would anyone like to tell me what is the wrong in my code?
Thanks for help.