Hi guys,
this is the first time, I am doing one of SPOJ's problems and I am feeling a little thick at the moment. I know my code works and it gives me the right answers, but for some reason test engine rejects it (Wrong answer).
I am not looking for optimisations or the like, I would just like to have a hint, what I have to do, so that my (in my opinion) correct answers are accepted
From the way the question is phrased (see below for cross-reference), it isn't clear to me, if I have to provide a random number to test or whether during the test I have to provide input fields for test numbers to be inserted.
Here is the question:
and here's my code (again just want a working code before attempting any sort of optimisations; This one is with providing raw inputs for testing):
Code removed
Any hints are appreciated. Thanks folks.