Probability of getting 1 when a fair dice is rolled.
Created 3 years ago
928
Views
2
Comments
Can anyone help me with the approach for this question?
Question:
boy rolls an unbiased die until he gets ‘1’.You are given a number n find the total sum of probability that he will get ‘1’ on or before nth trial.(Probability of getting 1 at 1 time + probability of getting 1 at 2 trial….+probability of getting 1 at nth trial)
Constraints
1<=n<=1000
Input Description:
You are given a number ‘n’.
Output Description:
Print two numbers denoting numerator and denominator
Sample Input :
1
Sample Output :
1 6