로딩
티스토리 데이터 처리 중입니다.

*배열* arr3 (java, 알고리즘)

 *배열* arr3 (java, 알고리즘)

배열을 선언한 뒤 풀어야 하는 arr3문제이다. 핵심 이중 배열을 선언하여, 위치를 나타낸다.

처음에 풀 때는 첫 번째 줄에 배열의 값을 저장한 뒤, 이후 나머지 줄의 배열을 규칙적으로 대입해주었는데, 더욱 쉬운 방법이 있다. 정답 코드 import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n =sc.nextInt(); int[][] arr = new int[105][105]; int x,y; int count=1; for (int i=0;i...