목록13777 (1)
하루일문
[백준] 13777번 Hunt The Rabbit(파이썬)
문제 13777번: Hunt The Rabbit For each line of input, output the numbers of all envelopes opened, in the order they were opened, until the rabbit is found. Each number must be on the same line separated by a space from the previous number. www.acmicpc.net 코드 while True: start, end = 1, 50 N = int(input()) # N이 0이면 반복을 끝낸다 if N == 0: break while True: # start와 end의 중간을 구한다 n = (start + end) // 2 # 중..
algorithm/baekjoon
2023. 4. 9. 20:39