Post History
#9: Post edited
Probability of rolling all 6 dice faces
- Probability of rolling all 6 dice faces [FINALIZED]
- The probability of rolling every number from 1 to 6 with $N$ six-sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct result when rounded to 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.015432
- 7 : 0.054012
- 8 : 0.114026
- 9 : 0.189043
- 10 : 0.271812
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- ## Now posted: [Probability of rolling all 6 dice faces](https://codegolf.codidact.com/posts/288917)
- ---
- The probability of rolling every number from 1 to 6 with $N$ six-sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct result when rounded to 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.015432
- 7 : 0.054012
- 8 : 0.114026
- 9 : 0.189043
- 10 : 0.271812
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#8: Post edited
- The probability of rolling every number from 1 to 6 with $N$ six-sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
*Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.015432
- 7 : 0.054012
- 8 : 0.114026
- 9 : 0.189043
- 10 : 0.271812
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- The probability of rolling every number from 1 to 6 with $N$ six-sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct result when rounded to 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.015432
- 7 : 0.054012
- 8 : 0.114026
- 9 : 0.189043
- 10 : 0.271812
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#7: Post edited
- The probability of rolling every number from 1 to 6 with $N$ six-sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.015432
- 7 : 0.054012
- 8 : 0.114026
- 9 : 0.189043
TODO: test case for 10 to 6 decimal places- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- The probability of rolling every number from 1 to 6 with $N$ six-sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.015432
- 7 : 0.054012
- 8 : 0.114026
- 9 : 0.189043
- 10 : 0.271812
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#6: Post edited
- The probability of rolling every number from 1 to 6 with $N$ six-sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
6 : 0.01543217 : 0.0540123- 8 : 0.114026
- 9 : 0.189043
- TODO: test case for 10 to 6 decimal places
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- The probability of rolling every number from 1 to 6 with $N$ six-sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.015432
- 7 : 0.054012
- 8 : 0.114026
- 9 : 0.189043
- TODO: test case for 10 to 6 decimal places
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#5: Post edited
Probability of rolling all 6 dice faces
- The probability of rolling every number from 1 to 6 with $N$ six-sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
6 : 0.0154320987654TODO: test cases up to 10 to 6 decimal places- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- The probability of rolling every number from 1 to 6 with $N$ six-sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.0154321
- 7 : 0.0540123
- 8 : 0.114026
- 9 : 0.189043
- TODO: test case for 10 to 6 decimal places
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#4: Post edited
The probability of rolling every number from 1 to 6 with $N$ dice.- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.0154320987654
- TODO: test cases up to 10 to 6 decimal places
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- The probability of rolling every number from 1 to 6 with $N$ six-sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.0154320987654
- TODO: test cases up to 10 to 6 decimal places
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#3: Post edited
The probability of rolling every number from 1 to 6 with $N$ 6 sided dice.- ## Input
- - A positive integer $N$.
- Your code must work for inputs up to and including 10, but may crash or error for larger inputs.- ## Output
- - A probability, $0 \le p \le 1$
- This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ 6 sided dice simultaneously.- For inputs up to and including 10, the output must be correct to 6 decimal places.- If you provide more than 6 decimal places, they do not need to be correct.- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- Outputs are shown to 29 decimal places, but only the first 6 are required.- Inputs are listed up to 100, but only the first 10 are required.- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.0154320987654
TODO: more test cases and all to 29 decimal places- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- The probability of rolling every number from 1 to 6 with $N$ dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ six-sided dice simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.0154320987654
- TODO: test cases up to 10 to 6 decimal places
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#2: Post edited
- The probability of rolling every number from 1 to 6 with $N$ 6 sided dice.
- ## Input
- A positive integer, $N$.- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ 6 sided dice simultaneously.
## Test casesTest cases are in the format `input : output`.- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.0154320987654
TODO: more test cases- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- The probability of rolling every number from 1 to 6 with $N$ 6 sided dice.
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash or error for larger inputs.
- ## Output
- - A probability, $0 \le p \le 1$
- - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ 6 sided dice simultaneously.
- - For inputs up to and including 10, the output must be correct to 6 decimal places.
- - If you provide more than 6 decimal places, they do not need to be correct.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- - Outputs are shown to 29 decimal places, but only the first 6 are required.
- - Inputs are listed up to 100, but only the first 10 are required.
- ```text
- 1 : 0
- 2 : 0
- 3 : 0
- 4 : 0
- 5 : 0
- 6 : 0.0154320987654
- TODO: more test cases and all to 29 decimal places
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#1: Initial revision
Probability of rolling all 6 dice faces
The probability of rolling every number from 1 to 6 with $N$ 6 sided dice. ## Input - A positive integer, $N$. ## Output - A probability, $0 \le p \le 1$ - This is the probability of seeing every number from 1 to 6 at least once after rolling $N$ 6 sided dice simultaneously. ## Test cases Test cases are in the format `input : output`. ```text 1 : 0 2 : 0 3 : 0 4 : 0 5 : 0 6 : 0.0154320987654 TODO: more test cases ``` ## Scoring This is a [code golf challenge]. Your score is the number of bytes in your code. > Explanations are optional, but I'm more likely to upvote answers that have one. [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"