Test data is not provided. Part of the resolution to many problems at SPOJ is to debug your program.
One question you can ask yourself is the run-time for input of “1 1000000” (i.e., the maximum). Given that runtime, how many test cases can the program process? You will need to make improvements in this area. Many users have an average runtime per test case of zero.