home *** CD-ROM | disk | FTP | other *** search
- 1 print"[147]":poke53280,6:poke53281,1:poke646,0
- 2 printtab(6)"commadares...math mystery2"
- 3 rem solution by
- 4 rem ron jordan
- 5 rem
- 10 a=1 : n=7 : dim c(n-1)
- 20 for j=a to 8:p$=mid$(str$(a),2)+mid$(str$(j+1),2)
- 30 for k=1to9:r$=right$(str$(k),1):if r$=left$(p$,1) or r$=right$(p$,1) then 50
- 40 s$=s$+r$
- 50 next k
- 60 i=n-1 : v=val(s$):if v/11=int(v/11) then print s$,:ct=ct+1
- 70 s$=left$(s$,i-1)+right$(s$,n-i)+mid$(s$,i,1)
- 80 c(i)=c(i)+1:if c(i)<=n-i then 60
- 90 c(i)=0:if i>1 then i=i-1:goto 70
- 100 print "count =" ct:s$=""
- 110 next j:a=a+1:if a<9 then 20
-