ATM solution in PHP?

,

I guess I am not cleared about the input and output formats required with PHP. Not even able to find out any accepted solution in PHP! Any one can me point the proper solution in PHP or can you tell me the bug in my solution? This was my answer http://www.codechef.com/viewsolution/1143977

On getting a clear idea, I can proceed properly for the next problem! Thanks in advance for the help!!

Why are you reading 2 lines from the input, when there is just one in problem statement? Did I missed something? I’m not PHP coder, but here is manual page for PHP fgets().

1 Like

@betlista, Thanks a ton! You are absolutely right :slight_smile:
Moreover I made a syntactical error in my output statement just like a dumb headed one!!
Now all fixed :slight_smile:
If anyone need help, can check this out http://www.codechef.com/viewsolution/1143989

@kuntalc: you don’t need to check input values :wink: Read What should I do with invalid input section from FAQ.

@betlista, another useful info! Thanks a lot!!

//