Your solution passed all tests

KiXtart
KiXtart Version = 4.60 Beta 1
KiXGolf Script = kixgolf_pq.kix

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Printer Queue
Processing Start = 2007/11/15 01:09:54.169
Processing End = 2007/11/15 01:09:54.606
Duration = 0000/00/00 00:00:00.436
KiXGolf Score = 138

; begin Printer Queue
;
;!
Function a($,$p)
dim $l
$l=9
while ~$p
if instr($,$l)
$p=$p-1
if $l>$
if 0>$p $p=($^)/2 endif
$=$+!+1*$
else
$a=$a+1
endif
$=substr($,3)
else
$l=$l-1
EndFunction
;!
;!
; end Printer Queue
_________________________
!

download KiXnet