목록바이너리 (1)
이야기박스

Problem Given a function random01Generator() that gives you randomly either 0 or 1, implement a function that utilizes this function and generate numbers between 0 and 6(both inclusive). All numbers should have same probabilities of occurrence. 먼저 0과 1을 생성하는 랜덤 함수가 주어집니다. 이제 우리는 위에 주어진 함수를 통하여 주어진 값 이하의 랜덤 숫자를 반환하는 함수를 만들어보면 됩니다. 주어진 문제에서는 6이라는 값이 Input으로 주어졌습니다. 하지만 우리는 6을 넘어서 INT_MAX 값까지 동작하는 ..
Computer & Data/Algorithm
2022. 2. 10. 22:42