I am working on problem [PROBTNPO - The 3n plus 1 problem](htt
ps://www.spoj.com/problems/PROBTNPO/) , I am getting TLE error. I tested my solution on different inputs and cant find problem.
My question is: is there a way to get input data on which spoj tests my solution? I cant find it.

  • created

    Nov '21
  • last reply

    Nov '21
  • 1

    reply

  • 1.5k

    views

  • 2

    users

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.