<?php
// 64160267 kanokpol promtha
//check คะแนน
function exam01($alice, $bob){
$a= 0;
$b= 0;
for($i=0;$i<count($alice);$i++){
if($alice[$i]>$bob[$i]){
// count คะแนน alice
$a++;
}if($alice[$i]<$bob[$i]){
// count คะแนน bob
$b++;
}
}
return array($a,$b);
}
function test_01(){
if(exam01([1,2,3], [7,1,3]) == [1,1]){
echo "pass";
} else {
echo "fail";
}
}
test_01();