Skip to main content
added 274 characters in body
Source Link
Jörg Hülsermann
  • 13.3k
  • 3
  • 15
  • 36

PHP>=7.1, 60 bytes

prints 0 for no escape

[,$h,$u,$d]=$argv;echo$h>$u?$u>$d?ceil(($h-$d)/($u-$d)):0:1;

PHP Sandbox Online

PHP>=7.1, 67 bytes

prints nothing for no escape

for([,$h,$u,$d]=$argv;($u>$d?:$h<=$u)&&0<$h+$t*$d-$u*++$t;);echo$t;

PHP Sandbox Online

PHP>=7.1, 67 bytes

prints nothing for no escape

for([,$h,$u,$d]=$argv;($u>$d?:$h<=$u)&&0<$h+$t*$d-$u*++$t;);echo$t;

PHP Sandbox Online

PHP>=7.1, 60 bytes

prints 0 for no escape

[,$h,$u,$d]=$argv;echo$h>$u?$u>$d?ceil(($h-$d)/($u-$d)):0:1;

PHP Sandbox Online

PHP>=7.1, 67 bytes

prints nothing for no escape

for([,$h,$u,$d]=$argv;($u>$d?:$h<=$u)&&0<$h+$t*$d-$u*++$t;);echo$t;

PHP Sandbox Online

Source Link
Jörg Hülsermann
  • 13.3k
  • 3
  • 15
  • 36

PHP>=7.1, 67 bytes

prints nothing for no escape

for([,$h,$u,$d]=$argv;($u>$d?:$h<=$u)&&0<$h+$t*$d-$u*++$t;);echo$t;

PHP Sandbox Online