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; + } +} + +```