THE BUTTON

THE BUTTON

124 个评价
Odds of reaching each button press
由 Squck 制作
Using ReformedKanye's formula https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2982958891 (I was initially going about this problem the wrong way) and some C++ knowledge, I have the odds of reaching each button press.
9
2
2
6
6
2
   
奖励
收藏
已收藏
取消收藏
The Odds of Reaching Each Button
Once again, thank you to ReformedKanye for the formula ((100)! / (100-x)!) / 100^x in which x is the button press. Visit his guide! (It's linked in the description, and in it you can see how long it will take you to get to 100 presses!)

Press 1: 100.000%
Press 2: 99.000%
Press 3: 97.020%
Press 4: 94.109%
Press 5: 90.345%
Press 6: 85.828%
Press 7: 80.678%
Press 8: 75.031%
Press 9: 69.028%
Press 10: 62.816%
Press 11: 56.534%
Press 12: 50.315%
Press 13: 44.277%
Press 14: 38.521%
Press 15: 33.128%
Press 16: 28.159%
Press 17: 23.654%
Press 18: 19.633%
Press 19: 16.099%
Press 20: 13.040%
Press 21: 10.432%
Press 22: 8.2412%
Press 23: 6.4282%
Press 24: 4.9497%
Press 25: 3.7618%
Press 26: 2.8213%
Press 27: 2.0878%
Press 28: 1.5241%
Press 29: 1.0973%
Press 30: 0.77911%
Press 31: 0.54538%
Press 32: 0.37631%
Press 33: 0.25589%
Press 34: 0.17145%
Press 35: 0.11315%
Press 36: 0.073551%
Press 37: 0.047072%
Press 38: 0.029656%
Press 39: 0.018386%
Press 40: 0.011216%
Press 41: 0.0067295%
Press 42: 0.0039704%
Press 43: 0.0023028%
Press 44: 0.0013126%
Press 45: 0.0007351%
Press 46: 0.0004049%
Press 47: 0.0002183%
Press 48: 0.0001157%
Press 49: 0.0000602% (less than your odds of getting hit by lightning - (1/13k, or 0.0000769%))
Press 50: 0.0000307%
Press 51: 0.000015343%
Press 52: 0.000007518% #high score!
Press 53: 3.608578e-06%
Press 54: 1.696031e-06%
Press 55: 7.801745e-07%
Press 56: 3.510786e-07%
Press 57: 1.544745e-07%
Press 58: 6.642406e-08%
Press 59: 2.789810e-08%
Press 60: 1.143822e-08% (~0.000000011%)
Press 61: 4.575289e-09%
Press 62: 1.784362e-09% (more likely to win the lottery, since that's only 1/292 Million [3.424e-9])
Press 63: 6.780579e-10%
Press 64: 2.508814e-10%
Press 65: 9.031731e-11%
Press 66: 3.161105e-11%
Press 67: 1.074776e-11%
Press 68: 3.546760e-12%
Press 69: 1.134963e-12% (~ 0.00000000000113%) nice
Press 70: 3.518386e-13% (~ 0.000000000000351%)
Press 71: 1.055516e-13%
Press 72: 3.060996e-14%
Press 73: 8.570790e-15%
Press 74: 2.314113e-15%
Press 75: 6.016694e-16% (~ 0.000000000000000601%)
Press 76: 1.504173e-16%
Press 77: 3.610016e-17%
Press 78: 8.303038e-18% (~ 0.0000000000000000083%) #past glitched high score!
Press 79: 1.826668e-18%
Press 80: 3.836003e-19% (~0.00000000000000000038%)
Press 81: 7.672007e-20%
Press 82: 1.457681e-20%
Press 83: 2.623826e-21%
Press 84: 4.460505e-22%
Press 85: 7.136808e-23%
Press 86: 1.070521e-23%
Press 87: 1.498729e-24%
Press 88: 1.948348e-25%
Press 89: 2.338018e-26%
Press 90: 2.571820e-27% (~0.000000000000000000000000002571%)
Press 91: 2.571820e-28%
Press 92: 2.314638e-29%
Press 93: 1.851710e-30%
Press 94: 1.296197e-31%
Press 95: 7.777184e-33%
Press 96: 3.888592e-34%
Press 97: 1.555437e-35%
Press 98: 4.666310e-37%
Press 99: 9.332621e-39%
Press 100: 9.33262e-41% (~0.000000000000000000000000000000000000000093%)
The Code
Here is the code:
#include <iostream> #include <iomanip> #include <cmath> double calculateOdds(int x) { double factorial = 1.0; double power = pow(100.0, x); for (int i = 100; i > 100 - x; --i) { factorial *= i; } return factorial / power; } int main() { int numPresses; std::cout << "Enter the number of button presses: "; // I entered 100 just to have all the values std::cin >> numPresses; for (int i = 1; i <= numPresses; ++i) { double odds = calculateOdds(i); std::cout << "Press " << i << ": "; if (odds >= 0.0001 && odds < 100.0) { std::streamsize precision = 3 - static_cast<int>(std::log10(odds)); if (precision < 0) precision = 0; std::cout << std::fixed << std::setprecision(precision); } else { std::cout << std::scientific << std::setprecision(15); } /* I wanted to have a nicer system of having it output both the fixed and scientific notation for the really low odd buttons but couldn't be bothered to fix this part of the code. I put some examples of the fixed notation values for more important numbers. */ std::cout << odds * 100.0 << "%" << std::endl; } return 0; }
28 条留言
Utah420_ 7 月 4 日 上午 5:38 
I wake up to 100 wtf
itnaboi 2024 年 10 月 6 日 下午 12:15 
when i got 1500 clciks i had 40 points.
i am now at 33000 clciks. still 40 points.
THIS GAME IS FUN!!!!!111!!1!11!11!111!1!1!!1!!1
HELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPMEHELPME
bagorats 2024 年 10 月 3 日 上午 1:58 
w
theebetapig 2024 年 9 月 28 日 上午 10:03 
ive gotten 31
skibidi_fisher 2024 年 8 月 31 日 下午 5:50 
@Sab_33 gamble. now.
Sab_33 2024 年 8 月 29 日 下午 1:06 
should i gamble? i got to 34 under 500 total clicks
Jcube11 2024 年 8 月 10 日 下午 12:43 
hole mole:lh2cat:
antvoidツ 2024 年 7 月 21 日 下午 9:13 
@gecidraldo i have 48 resets and 29 pb
dirimesavir 2024 年 6 月 1 日 上午 1:03 
i have 48
gecidaralo 2024 年 5 月 6 日 上午 3:04 
idk how is this true because i have 400 resets ad 5k total and only a 28 pb