Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#PHP, (削除) 111 (削除ここまで)(削除) 100 (削除ここまで) 97 bytes

PHP, (削除) 111 (削除ここまで)(削除) 100 (削除ここまで) 97 bytes

$s=str_repeat("00000\n",5);$s[($x=($a=$argv)[1])+29-6*$y=$a[2]]=$a[3];echo$x&&$y&&$x<6&$y<6?$s:E;

prints E if row/column out of range.
Run with php -r <code> <row> <column> <character>

#PHP, (削除) 111 (削除ここまで)(削除) 100 (削除ここまで) 97 bytes

$s=str_repeat("00000\n",5);$s[($x=($a=$argv)[1])+29-6*$y=$a[2]]=$a[3];echo$x&&$y&&$x<6&$y<6?$s:E;

prints E if row/column out of range.
Run with php -r <code> <row> <column> <character>

PHP, (削除) 111 (削除ここまで)(削除) 100 (削除ここまで) 97 bytes

$s=str_repeat("00000\n",5);$s[($x=($a=$argv)[1])+29-6*$y=$a[2]]=$a[3];echo$x&&$y&&$x<6&$y<6?$s:E;

prints E if row/column out of range.
Run with php -r <code> <row> <column> <character>

fixed typo
Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41

#PHP, (削除) 111 (削除ここまで) (削除) 100 (削除ここまで) 97 bytes

$s=str_repeat("00000\n",5);$s[($x=($a=$argv)[1])+29-6*$y=$a[2]]=$a[3];echo$y&&$y&&$x<6&$y<66*$y=$a[2]]=$a[3];echo$x&&$y&&$x<6&$y<6?$s:E;

prints E if row/column out of range.
Run with php -r <code> <row> <column> <character>

#PHP, (削除) 111 (削除ここまで) (削除) 100 (削除ここまで) 97 bytes

$s=str_repeat("00000\n",5);$s[($x=($a=$argv)[1])+29-6*$y=$a[2]]=$a[3];echo$y&&$y&&$x<6&$y<6?$s:E;

prints E if row/column out of range.
Run with php -r <code> <row> <column> <character>

#PHP, (削除) 111 (削除ここまで) (削除) 100 (削除ここまで) 97 bytes

$s=str_repeat("00000\n",5);$s[($x=($a=$argv)[1])+29-6*$y=$a[2]]=$a[3];echo$x&&$y&&$x<6&$y<6?$s:E;

prints E if row/column out of range.
Run with php -r <code> <row> <column> <character>

assigned $argv to $a; golfed condition
Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41

#PHP, (削除) 111 (削除ここまで) 100(削除) 100 (削除ここまで) 97 bytes

$s=str_repeat("00000\n",5);$s[($x=$argv[1]-1$x=($a=$argv)+6*$y=5[1])+29-$argv[2]]=$argv[3];echo$x<0|$x>4|$y<0|$y>46*$y=$a[2]]=$a[3];echo$y&&$y&&$x<6&$y<6?$s:$s;E;

prints 1E for parametersif row/column out of range.
Run with php -r <code> <row> <column> <character>

#PHP, (削除) 111 (削除ここまで) 100 bytes

$s=str_repeat("00000\n",5);$s[($x=$argv[1]-1)+6*$y=5-$argv[2]]=$argv[3];echo$x<0|$x>4|$y<0|$y>4?:$s;

prints 1 for parameters out of range.
Run with php -r <code> <row> <column> <character>

#PHP, (削除) 111 (削除ここまで) (削除) 100 (削除ここまで) 97 bytes

$s=str_repeat("00000\n",5);$s[($x=($a=$argv)[1])+29-6*$y=$a[2]]=$a[3];echo$y&&$y&&$x<6&$y<6?$s:E;

prints E if row/column out of range.
Run with php -r <code> <row> <column> <character>

golfed the die
Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41
Loading
Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41
Loading

AltStyle によって変換されたページ (->オリジナル) /