CJ Club TOP/ぷっちCGI/LimeCounter+W を BEST10に
| □ LimeCounter+W を BEST10に □ |
|---|
$rank1 = 0;
$rank2 = 1;
$count_tmp = 0;
$best = 0;
foreach (sort { ($count{$b} <=> $count{$a}) || ($a cmp $b)} keys(%count)) {
($count{$_} == $count_tmp) || ($rank1 = $rank2);
$best++;
if ($best > 10) { last; }
# 統計率を計算(四捨五入)
$toukei = 1000 * $count{$_} / $total;
$toukei = int($toukei);
$keta = substr($toukei,-1,1);
$toukei = $toukei / 10;
$toukei = int($toukei);
if ($keta >= 5) { $toukei++; }
|