i am trying to solve this:
link text
and my solution is:
link text
When i submit it, it shows wrong answer, though it works fine on my computer. I tested it locally using an input and an output text file.
The contents of the input file are:
81
85
155
0
The contents of the output file:
29 5 3
73 2 2
79 7 3
The output written to the out.txt file is exactly as the problem demands. What am I doing wrong? Thanks in advance!