[백준/Java] 3733 : Shares

SEOP·2024년 6월 15일
0

import java.io.*;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new BufferedReader(new InputStreamReader(System.in)));
        BufferedWriter bw = new BufferedWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

        String input = "";

        while ( (input = br.readLine()) != null && !input.isEmpty() ){
            int[] intArr = Arrays.stream(input.split(" ")).mapToInt(Integer::parseInt).toArray();
                String result = String.valueOf(intArr[1] / (intArr[0] + 1));
                bw.write(result);
                bw.newLine();
        }

        bw.flush();
        bw.close();
    }
}
profile
응애 나 애기 개발자

0개의 댓글