
✅ 문제 아래와 같이 숫자가 담긴 1차원 배열이 주어졌을 때, 두 개의 숫자를 뽑아 서로의 거리를 비교한 후 거리가 가장 작은 숫자의 위치(index)를 출력하시오. ✅ 코드public class Main { public static void main(String[] args) { int[] point = { 92, 32, 52, 9, 81, 2, 68 }; int dist = 1000000000; int[] result = new int[2]; for (int i = 0; i Math.abs(point[i] - point[j])) { dist = Math.abs(point[i] - point[j]); result[0] = i; result[1] = j; } ..