I am currently trying to solve this problem. The problem is that I get Runtime Error on test cases 9b and 9c, even though I don't have any problem running it on my computer (both mac os and linux).
What do you think is the reason? Can you tell me if it works on your system?