๋ฐ์ํ 2501๋ฒ1 [๋ฐฑ์ค] 2501๋ฒ: ์ฝ์ ๊ตฌํ๊ธฐ https://www.acmicpc.net/problem/2501 2501๋ฒ: ์ฝ์ ๊ตฌํ๊ธฐ ์ฒซ์งธ ์ค์ N๊ณผ K๊ฐ ๋น์นธ์ ์ฌ์ด์ ๋๊ณ ์ฃผ์ด์ง๋ค. N์ 1 ์ด์ 10,000 ์ดํ์ด๋ค. K๋ 1 ์ด์ N ์ดํ์ด๋ค. www.acmicpc.net ์ฝ๋ import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int K = scan.nextInt(); int countN = 0;// N์ ์ฝ์ ๊ฐ์ int index = 0;// K๋ฒ์งธ ์์์์ ํ๋ณํ ๋ณ์ int result = 0;// ๊ฒฐ๊ณผ๊ฐ for(in.. 2020. 1. 20. ์ด์ 1 ๋ค์ ๋ฐ์ํ