# 문제주소: https://www.acmicpc.net/problem/11005 # 코드import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class BOJ11005_v1 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] input = br.readLine().split(" "); int N = Integer.parseInt(input[0]); int B..