Advertisement
EntropyStarRover

Spice must flow

May 23rd, 2019
154
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function spiceMustFlow(yield){
  2.  
  3.     let operationalDays=0;
  4.     let spiceExtracted=0;
  5.  
  6.  
  7.    while (yield>=100){
  8.     operationalDays++;
  9.     spiceExtracted+=yield;
  10.     spiceExtracted-=26;
  11.    
  12.    
  13.     yield-=10;
  14.  
  15.    }
  16.    spiceExtracted-=26;
  17.    console.log(operationalDays);
  18.    console.log(spiceExtracted);
  19.    
  20. }
Advertisement
RAW Paste Data Copied
Advertisement