Advertisement
Aenimus

% Likelihood for number of fluffers to finish the war

Jul 24th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. results = [];
  2. for (i = 0; i < 100000000; i++) {
  3. a = 1000;
  4. b = 1000;
  5. myCounter = 0;
  6. while (a > 0 && b > 0) {
  7. a -= 36 + Math.floor(Math.random() * 11);
  8. b -= 36 + Math.floor(Math.random() * 11);
  9. myCounter++;
  10. }
  11. if (results[myCounter] == undefined) {
  12. results[myCounter] = 1;
  13. } else {
  14. results[myCounter]++;
  15. }
  16. }
  17. for (count in results) {
  18. console.log(count + ' stuffing fluffers to kill all frats OR hippies ' + ' = ' + results[count]/i*100 + '%');
  19. }
  20. 1,000,000 instances:
  21. 23 stuffing fluffers to kill all frats OR hippies = 0.0121%
  22. 24 stuffing fluffers to kill all frats OR hippies = 29.2997%
  23. 25 stuffing fluffers to kill all frats OR hippies = 70.4039%
  24. 26 stuffing fluffers to kill all frats OR hippies = 0.2843%
  25.  
  26. 1,000,000,000 instances:
  27. VM83:18 23 stuffing fluffers to kill all frats OR hippies = 0.00094292%
  28. VM83:18 24 stuffing fluffers to kill all frats OR hippies = 26.7680696%
  29. VM83:18 25 stuffing fluffers to kill all frats OR hippies = 72.8519678%
  30. VM83:18 26 stuffing fluffers to kill all frats OR hippies = 0.3705334%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement