![:)](./images/smilies/icon_smile.gif)
a) Input is terminated by a line containing 0 0, not "0 0 0" and there were inputs like "0 0 3" so many were trapped.
b) a and b could be complex.
c) Still there were inputs like "1 0 200000000" or "2 1 200000000" so yes fast exponentiation was required or you had to handle this case expecially.
And still there are some more traps.
I was actually so worried, I had no time to set a difficult problem but somehow I had to keep you busy for five hours. Problem G was difficult but I knew few people will understand and try it.
Allmost all elite problem setters have some problems which only he can solve and with it a few others. As my number of problems is highest so is the no of nasty problems.
I should have been slammed for problem F (which was wrong) not problem E I guess
![:)](./images/smilies/icon_smile.gif)