Here is a exemple of the template for bender-episode-1
<?php
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
fscanf(STDIN, "%d %d",
$L,
$C
);
for ($i = 0; $i < $L; $i++)
{
$row = stream_get_line(STDIN, 101 + 1, "\n");
}
// Write an action using echo(). DON'T FORGET THE TRAILING \n
// To debug (equivalent to var_dump): error_log(var_export($var, true));
echo("answer\n");
?>
-
echo is not a function, its a keyword, so it shouldn’t have parateses.
so just:echo "answer\n";
, orecho 'answer', PHP_EOL;
(also remove them from the comment) -
?>
indicates the start of an raw output, and as there is no raw output behind it, it’s not needed, and only increase the chans of error, if someone put some whitespace behinds it. -
stream_get_line(STDIN, 101 + 1, "\n");
Why 101 + 1?? -
fscanf(STDIN, "%d %d"
have unnessesary use of dubble quotes, single quotes should be used here, according to some coding styles.