Advertisement
EmanueleBonin

I numeri degli inni

Jan 25th, 2019
2,790
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 05 n=ti : print "soluzione quickest and uglyest"
  2. 10 for a = 1 to 3
  3. 20 for b = 0 to 9
  4. 25 if b=a goto 150
  5. 30 for c=0 to 9
  6. 32 if c=a or c=b goto 140
  7. 35 r=0:if c > 4 then f=2*c-10: r= 1:goto 38
  8. 36 f=2*c
  9. 38 if f = a or f= b or f=c  goto 140
  10. 40 if b >= 5 then e = 2*b-10 + r: r=1: goto 42
  11. 41 e = 2*b+r:r=0
  12. 42 if e = a or e= b or e=c or e= f goto 140
  13. 50 d = 2*a+r: if d > 6 or d < 3 goto 140
  14. 52 if d=a or d=b or d=c or d=f or d=e  goto 140
  15. 62 r=0:if c < 4 then i = 3*c:goto 92
  16. 72 if c < 7 then i = 3*c-10: r=1: goto 92
  17. 82 i = 3*c-20: r=2
  18. 92 if i = a or i= b or i=c or i= d or i = e or i= f goto 140
  19. 102 h=3*b+r: r=0: if h >= 20 then h=h-20:r=2: goto 107
  20. 105 if h>=10 then h=h-10:r=1
  21. 107 if h = a or h= b or h=c or h= d or h = e or h= f or h = i goto 140
  22. 117 g=a*3+r: if g = a or g= b or g=c or g= d or g = e or g= f or g=h or g=i goto 140
  23. 130 X= 100*a+10*b+c:print X;X*2;X*3
  24. 140 next c
  25. 150 next b
  26. 160 next a
  27. 170 print "run time:";(ti-n)/60
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement