<?php
$x[0][1]=2;
$x[0][2]=1;
$x[1][1]=1;
$x[1][2]=2;
$x[1][3]=1;
$b[1]=14;
$x[2][1]=1;
$x[2][2]=1;
$x[2][4]=1;
$b[2]=8;
$x[3][1]=3;
$x[3][2]=1;
$x[3][5]=1;
$b[3]=18;
$op=1;
for ($m=1;$m<4;$m++){
$under=$x[$m][$op];
if ($under==0){
$under=0.00001;
}
$c[$m]=$b[$m]/$under;
}
$minc=999;
$pibot=0;
for ($m=1;$m<4;$m++){
$h=0;
if ($c[$m]<$minc){
$h=$h+1;
}
if ($c[$m]>0){
$h=$h+1;
}
if ($h==2){
$minc=$c[$m];
}
if ($h==2){
$pibot=$m;
}
}
print($pibot);
?>
最終更新:2009年06月28日 01:21