Why does it show runtime error??

(code edited by @cyberax for the reason given by @ritesh_gupta :

the poster is invited to post again when the contest is ended.)

@amalaray:: The solution that you posted is the solution of one of the problem From the Live Contest going on at codechef.Even though its incorrect solution,don’t repeat it.Such an act leads to suspension of account .Refer the guidelines What kind of comment should I post on the problem page? - help - CodeChef Discuss.

2 Likes