Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 04 DIM X(10):s=0:print "soluzione quickest and uglyest v2":n=ti
- 10 for a=1to3
- 20 for b=0to9
- 25 if b=a goto150
- 30 for c=0to9
- 31 if a=3 then if b>3 goto 165
- 32 if c=a goto140
- 33 if c=b goto140
- 35 r=0:if c>4then f=2*c-10:r=1:goto38
- 36 f=2*c
- 37 if f=a goto140
- 38 if f=b goto140
- 39 if f=c goto 140
- 40 if b>=5then e=2*b-10+r:r=1:goto42
- 41 e = 2*b+r:r=0
- 42 if e=a goto140
- 43 if e=b goto140
- 44 if e=c goto140
- 45 if e=f goto140
- 50 d=2*a+r: if d>6goto140
- 51 if d<3goto140
- 52 if d=a goto140
- 53 if d=b goto140
- 54 if d=c goto140
- 55 if d=f goto140
- 56 if d=e goto140
- 62 r=0:if c<4 then i =3*c:goto92
- 72 if c<7then i=3*c-10:r=1:goto92
- 82 i = 3*c-20: r=2
- 92 if i=a goto140
- 93 if i=b goto140
- 94 if i=c goto140
- 95 if i=d goto140
- 96 if i=e goto140
- 97 if i=f goto140
- 102 h=3*b+r:r=0:if h>=20then h=h-20:r=2:goto107
- 105 if h>=10then h=h-10:r=1
- 107 if h=a goto140
- 108 if h=b goto140
- 109 if h=c goto140
- 110 if h=d goto140
- 111 if h=e goto140
- 112 if h=f goto140
- 113 if h=i goto140
- 117 g=a*3+r
- 118 if g=a goto140
- 119 if g=b goto140
- 120 if g=c goto140
- 121 if g=d goto140
- 122 if g=e goto140
- 123 if g=f goto140
- 124 if g=h goto140
- 125 if g=i goto140
- 128 S=S+1:X(S)=100*a+10*b+c
- 140 next c
- 150 next b
- 160 next a
- 165 n=ti-n
- 170 for i = 1 to S
- 190 print X(i);X(i)*2;X(i)*3
- 200 next
- 210 print "run time:";n/60
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement