transform the expression

http://www.codechef.com/viewsolution/3339018 see this is my code for3rd test case thier is run time error can any body fix mah code

//