
[๋ฐฑ์ค/Java] 1929 ์์ ๊ตฌํ๊ธฐ(์๋ผํ ์คํ
๋ค์ค์ ์ฒด)
ยท
๐ท์๊ณ ๋ฆฌ์ฆ ๋ฌธ์ ํ์ด/๋ฐฑ์ค
https://www.acmicpc.net/problem/1929๐ ํ์ด : ์๋ผํ ์คํ
๋ค์ค์ ์ฒดimport java.io.*;public class Main { // M์ด์ N์ดํ์ ์์๋ฅผ ๋ชจ๋ ์ถ๋ ฅํ๋ ํ๋ก๊ทธ๋จ public static void main(String[] args) throws IOException { /* [1] ์
๋ ฅ ์ฒ๋ฆฌ */ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] input = br.readLine().split(" "); int M = Integer.parseInt(input[0]); // ๋ฒ์์ ์์๊ฐ M ..