HASH-IT SPOJ HELP REQUIRED

I am trying to solve this problem https://www.spoj.com/problems/HASHIT/, i have passed all the test case from spoj toolkit
but still getting WA. Can someone look at the solution: