Guest User

Untitled

a guest
Apr 16th, 2016
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # The Riddler - Space Race
  2. #
  3. # Written hastily by Tyler Barron - April 16 2016
  4.  
  5. bestScenario = 0
  6. for Lp in range (0,20):
  7. for NASA in range(0,8):
  8. for NASAFuel in range(0,40):
  9. for BRe in range(0,2):
  10. timesaved = 0
  11. cost = BRe*400+NASA*140+NASAFuel*2+Lp*50
  12. if cost <= 1000:
  13. if NASAFuel <= 5*NASA:
  14. if Lp <= 4:
  15. if BRe == 1:
  16. timesaved = 200
  17. if BRe == 2:
  18. timesaved = 300
  19. timesaved = timesaved + 10*NASAFuel + 25*Lp
  20. if timesaved > bestScenario:
  21. bestScenario = timesaved
  22. print("Bre =",BRe,"NASA = ",NASA,"NASAFuel = ",NASAFuel,"Lp = ",Lp,"Time Saved = ",timesaved,"cost = ",cost)
  23.  
  24. print("done")
RAW Paste Data