Skip to main content
Commonmark migration
Source Link

#PHP, 60 bytes

PHP, 60 bytes

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

prints N for None. Run with -r.

#PHP, 60 bytes

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

prints N for None. Run with -r.

PHP, 60 bytes

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

prints N for None. Run with -r.

added `$v>=$h` case
Source Link
Titus
  • 14.8k
  • 1
  • 24
  • 41

#PHP, 5260 bytes

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

prints N for None. Run with -r.

#PHP, 52 bytes

[,$h,$v,$d]=$argv;echo$v>$d?ceil(($h-$d)/($v-$d)):N;

prints N for None. Run with -r.

#PHP, 60 bytes

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

prints N for None. Run with -r.

Source Link
Titus
  • 14.8k
  • 1
  • 24
  • 41

#PHP, 52 bytes

[,$h,$v,$d]=$argv;echo$v>$d?ceil(($h-$d)/($v-$d)):N;

prints N for None. Run with -r.