[백준] 2512 : 예산 (파이썬)
·
Algorithm/Binary Search
이분 탐색 문제https://www.acmicpc.net/problem/2512💡 풀이 코드 (성공)import sys n = int(sys.stdin.readline())arr = list(map(int, sys.stdin.readline().split()))amounts = int(sys.stdin.readline())def binary_search(n, arr, amounts): start = 1 end = max(arr) answer = 0 while start