Hi
I've been submitting solutions to the COINS problem in SPOJ today. I've got accepted the Fortran and the Perl solutions, but I'm having "Wrong answer" in the Haskell solution. I thought that perhaps my code was faulty at some point, but the results for 200K numbers (100K in the upper limit and 100K in the lower one) are exactly as per the Perl solution as can be seen below:
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$ seq 1000000000 -1 999900001 > p346.in
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$ seq 0 100000 >> p346.in
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$ ./p346.pl < p346.in > p346.po
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$ ghc --make -o p346.exe p346.hs
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$ ./p346.exe < p346.in > p346.ho
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$ diff p346.ho p346.po
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$ head -n 5 p346.ho
4243218150
4243218150
4243218150
4243218150
4243218150
angelv@vaso:~/Dropbox/ProgrammingGym/SPOJ$
Is there any way to find what could be going on (perhaps the last few lines of the generated output?).
Cheers,
Ángel de Vicente