fork(1) download
  1. <?php
  2. $apples = array(
  3. 200,
  4. 100,
  5. 100,
  6. 100
  7. );
  8. function doApple($n, $array)
  9. {
  10.  
  11. $summary = array_sum($array);
  12. $half = $summary / 200;
  13. $half_floor = floor($summary / 200);
  14. if ($half != $half_floor || $n <= 2) {
  15. return "No\n";
  16. } else {
  17. return "Yes\n";
  18. }
  19.  
  20. }
  21. echo doApple(4, $apples);
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
No