I am trying to get acquainted with the procedures here and hence tried to submit the solution for a practice problem. But, it always returns as wrong answer. I also tried to submit an already selected answer (written in PAS fpc) as my answer (written in PHP), but it still didn’t work. Any insight ? Is my conversion not proper or there is some other way to submit a PHP code ?
$stdin = fopen("php://stdin", "r"); $input = fgets($stdin); $a = explode(' ',$input); if($a>=($a+0.5) && ($a%5)==0) echo number_format((float)($a-$a-0.5),2,'.',''); else echo number_format((float)$a, 2, '.', '')."\n"; fclose($stdin);
The answer that I copied from: http://www.codechef.com/viewsolution/357216