fork download
  1. <?php
  2.  
  3. function doSquare($n, $m, $a)
  4. {
  5. $square = $n * $m;
  6. $countHeight = ceil($n / $a);
  7. $countLength = ceil($m / $a);
  8. $count = $countHeight * $countLength;
  9. return $count . "\n";
  10. }
  11. echo doSquare(25, 14, 6);
  12. echo doSquare(8, 8, 7);
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
15
4