我写了一下,你看行不行
$site=array('A'=> 200,'C'=> 100,'G'=> 400,'T'=> 300);
arsort($site);
$a=current($site);
$b=next($site);
if(($a+$b)!=0){
$c=$b/($a+$b);
echo $c;
}