Brilliant!!!

But since some of the tests contain values of 0, this might be 'safer'

Code:

Function f($u)
dim $i,$j,$c,$x,$
$j=ubound($u)
while $c<$j
$f='' $c=0 $x=$u
for $=1 to 0^join($u,'')
$f=$f+rnd(1)
$=$+$j/2
next
for $=0 to $j
for $i=0 to $j
if $i<>$ & $f=$x[$]+$x[$i]
$c=$c+2
$x[$i]=2
$x[$]=2
Endfunction