my turn once more [Big Grin]
code:
function CDSorter($, $m)
Dim $x, $b
do
$x = split($,",")
do
$b=0.
Dim $z,$q,$
for each $q in $x
$=1+$
if $q
$b = $b + $q
$z=$z+","+$
endif
next
$x[RND($-2)]=0
$CDSorter=substr($z,2)
until $b < $m
until $b > $m-1
endfunction

quote:

Average CD Length = 44.45
Average Gap = 0.55
Average Gap [%] = 1.23

KiXtart
KiXtart Version = 4.21 Release Candidate 1
KiXGolf Script = kixgolf_cd.kix

Computer
OS = Windows 2000 Professional
CPU = Intel Pentium III
Speed = 797 MHz
Memory = 375 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: CD Sorter
Processing Start = 2003/03/16 22:11:37.299
Processing End = 2003/03/16 22:11:48.075
Duration = 0000/00/00 00:00:10.775
# Loops = 1
# Processed CDs = 12
# Valid CDs = 12
# Full CDs = 0
KiXGolf Result = Valid CD Filling
KiXGolf Score = 183

Thank you for participating in KiXtart Golf!

_________________________
!

download KiXnet