[๋ฐฑ์ค 2805] ๋๋ฌด ์๋ฅด๊ธฐ | ์๋ฐ
ยท
๐ Coding Test/๋ฐฑ์ค Sliver
๋ฌธ์ ๋๋ฌด ์๋ฅด๊ธฐ์ ๋ตimport java.util.*;class Main { static int n; // ๋๋ฌด์ ์ static int m; // ๊ฐ์ ธ ๊ฐ๋ ค๋ ๊ธธ์ด static int[] arr; public static void main(String[] args) { Scanner sc = new Scanner(System.in); n = sc.nextInt(); m = sc.nextInt(); arr = new int[n]; for (int i = 0; i mid) sum += arr[i] - mid; } if(sum >= m) { answer = mid; left = mid + 1; } else { ..