From e987e73341bc43cf5d9ab80e67481df6920ffcc8 Mon Sep 17 00:00:00 2001 From: LiiNi-coder <97495437+LiiNi-coder@users.noreply.github.com> Date: Mon, 17 Nov 2025 23:23:21 +0900 Subject: [PATCH] =?UTF-8?q?[20251117]=20PGM=20/=20LV2=20/=20n^2=20?= =?UTF-8?q?=EB=B0=B0=EC=97=B4=20=EC=9E=90=EB=A5=B4=EA=B8=B0=20/=20?= =?UTF-8?q?=EC=9D=B4=EC=9D=B8=ED=9D=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...7\264 \354\236\220\353\245\264\352\270\260" | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 "LiiNi-coder/202511/17 PGM n^2 \353\260\260\354\227\264 \354\236\220\353\245\264\352\270\260" diff --git "a/LiiNi-coder/202511/17 PGM n^2 \353\260\260\354\227\264 \354\236\220\353\245\264\352\270\260" "b/LiiNi-coder/202511/17 PGM n^2 \353\260\260\354\227\264 \354\236\220\353\245\264\352\270\260" new file mode 100644 index 00000000..a99f0556 --- /dev/null +++ "b/LiiNi-coder/202511/17 PGM n^2 \353\260\260\354\227\264 \354\236\220\353\245\264\352\270\260" @@ -0,0 +1,18 @@ +```java +class Solution { + public int[] solution(int n, long left, long right) { + long size = right - left + 1; + int[] answer = new int[(int)size]; + for(int i = 0; i < size; i++){ + long index = left + i; + long row = index / n; + long col = index % n; + answer[i] = (int)(Math.max(row, col) + 1); + + // System.out.println(index + " " + row + " " + col); + } + return answer; + } +} + +```