The Real Solutions –
(Not verified though)
Just go to the URL click upload with new input,paste your input file contents n you will get the output. Then simply submit the output as your solution.
SOLUTION 1: http://www.ideone.com/TNuEz
SOLUTION 2: NOT IN STAGE TO POST… WILL DO LATER
SOLUTION 3: http://ideone.com/cw8Wq
If you find any faults in the above solutions, let me know about them..