Code Chef “Yet Another Number Game” Problem Solved With PHP (Code: NUMGAME)

by Nishant Arora on 1/12/2011







Pin It

I love spending time on solving coding problems rather than watching tv or playing video games dunno why, but I love it, just an hour ago I started reading this problem here. And had developed a solution to the said problem:

I was amazed because while testing on the IDE here, and it was working all so fine, but when I submitted the solution to the codechef bot, it just gave me a time limit exceeded error. My jaws dropped when the error continued even after I had optimized the code pretty well. But as the say, you miss out things just right in front of you, thats it, I missed out an important pattern, the script was generating just even and odd outputs, in a formula not much known, study the test cases 1-10 and you will just say… AH-HA!…

So the solution simply becomes:

Easy Simple Slick!

Happy to solve it!

I see not many developers use PHP to get things done at CodeChef, maybe my findings helps others

Cheers!

Incoming search terms:

yet another number game | alice codechef | yet another number game solution | solution of yet another game in c | solution for problems on codechef | solution for numgame codechef | php and number game | numgame codechef solution in c | numgame codechef | codechef solutions to problems | code chef solutions | yet another number game solution algorithm |

Some Other Random Posts:


No related content found.

; Click Here To Buy Me A Drink!