반응형


코딩놀이! 10 Days of Statistics(HackerRank)

 Day 3-2: Cards of the Same Suit



8번째 문제! 

이번 문제는! Conditional Probability! 조건부 확률 문제입니다..

Objective 
In this challenge, we're getting started with combinations and permutations. Check out the Tutorial tab for learning materials! 

Task 
You draw  cards from a standard -card deck without replacing them. What is the probability that both cards are of the same suit?

1.   1 / 156
2.   1 / 39
3.   12 / 39
4.   12 / 51
You have 2 attempts left.



문제해석! * 이번 문제는 Tutorial을 참고하시면 됩니당(https://www.hackerrank.com/challenges/s10-mcq-5/tutorial)

1. 52장의 카드(모양별로 4종류의 슈트 : 다이아몬드 (◆)와 하트(♥), 검은 슈트는 스페이드(♠)와 클로버(♣))

2. 2장 연속으로 뽑는다!

3. 둘다 같은 카드일 확률은?


풀이!

1. 52장중 1장은 이미 뽑힌 상태

2. 51장중 먼저뽑은 카드와 같은 카드가 나올 확률은?

3. 일단, 52장중 같은 모양의 카드는 13개씩이죠?(52/4)

4. 52장중에 1장을 뽑았고 같은카드(13개)중 1장도 뽑았으니

5. 12/51 이 답이겠네요 ㅎㅎ









2,3일차 문제는 대부분 이런 문제입니다. 짧게 짧게 skip!~할게요


(출처:https://www.hackerrank.com/challenges/s10-mcq-5/problem)



반응형

+ Recent posts