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