In each of the sets, the order of the lines is: tops, spot, stop, post, pots, opts and then the total:
7219
9127
9721
1297
1279
2179
30822 = kazoo
7193
3917
3719
9137
9173
1973
35112 = swoon
5 dim Used(9)
6 print "order is tops, spot, stop, post, pots, opts"
10 for P=0 to 9
20 Used(P)=1
30 for O=0 to 9
40 if Used(O)=0 then
50 :Used(O)=1
60 :for T=0 to 9
70 :if Used(T)=0 then
80 :Used(T)=1
90 :for S=0 to 9
100 :if Used(S)=0 then
110 :Used(S)=1
115 :
120 :Tops=T*1000+O*100+P*10+S
121 :Spot=S*1000+P*100+O*10+T
122 :Stopp=S*1000+T*100+O*10+P
123 :Post=P*1000+O*100+S*10+T
124 :Pots=P*1000+O*100+T*10+S
125 :Opts=O*1000+P*100+T*10+S
130 :if prmdiv(Tops)=Tops then
131 :if prmdiv(Spot)=Spot then
132 :if prmdiv(Stopp)=Stopp then
133 :if prmdiv(Post)=Post then
134 :if prmdiv(Pots)=Pots then
135 :if prmdiv(Opts)=Opts then
140 :
160 :Total=Tops+Spot+Stopp+Post+Pots+Opts
170 :Sk=cutspc(str(Total))
180 :if Used(val(mid(Sk,1,1)))=0 and Used(val(mid(Sk,2,1)))=0 and Used(val(mid(Sk,3,1)))=0 then
190 :if mid(Sk,1,1)<>mid(Sk,2,1) and mid(Sk,1,1)<>mid(Sk,3,1) and mid(Sk,2,1)<>mid(Sk,3,1) then
200 :if val(mid(Sk,4,1))=O and val(mid(Sk,5,1))=O then
210 :print Tops:print Spot:print Stopp:print Post:print Pots:print Opts:print Total;"= kazoo":print
220 :endif
245 :endif
250 :endif
255 :
380 :if Used(val(mid(Sk,2,1)))=0 and Used(val(mid(Sk,5,1)))=0 then
390 :if mid(Sk,1,1)<>mid(Sk,2,1) and mid(Sk,1,1)<>mid(Sk,5,1) and mid(Sk,2,1)<>mid(Sk,5,1) then
400 :if val(mid(Sk,4,1))=O and val(mid(Sk,3,1))=O and val(mid(Sk,1,1))=s then
410 :print Tops:print Spot:print Stopp:print Post:print Pots:print Opts:print Total;"= swoon":print
420 :endif
445 :endif
450 :endif
455 :
800 :endif
810 :endif
820 :endif
830 :endif
840 :endif
850 :endif
855 :
910 :Used(S)=0
920 :endif
930 :next S
940 :Used(T)=0
950 :endif
960 :next T
970 :Used(O)=0
980 :endif
990 next O
1000 Used(P)=0
1010 next P
|
Posted by Charlie
on 2010-03-06 13:55:30 |