This is gonna drive me crazy.
I made a checker program that verifies that:
- the output is a valid palindrome
- It is bigger than input
- There is no palindrome smaller than output and bigger than input
Then i also made a random number generator that outputs a test file containing a specified amount of test cases, each test cases being a random number string of random length up to 1000000 digits.
I tested like this :
ruby -e “puts (100000001); puts (0…10000000).to_a” | ./palin | ./checker 2> log.txt
and
./gen 10000000 | ./palin | ./checker 2> log.txt
And i didn’t get a single wrong output ! I spent a few hours verifying each and every part of my checker program and running tests, And i can’t find ONE test case that fucks up.
All this time i’m assuming there are NO leading zero in any input.
I’m gonna modify my program and my checker to handle leading zeros in different ways and try to submit, but i already did several tries like this.
Now what ?
Can someone who passed this problem send me his code so i can compare outputs before i go completely nuts ?