몸무게와 키 배열을 따로 만들고 정답 배열의 초기값을 1등으로 시작했습니다. 그리고 배열을 돌아가면서 몸무게와 키 모두 값이 적을때 +1을 해주면서 등수가 밀리도록 했습니다. const fs = require("fs"); const [n, ...arr] = fs.readFileSync("/dev/stdin").toString().trim().split(/\n/); const height = []; const weight = []; const answer = []; for (let i = 0; i < n; i++) { const newArr = arr[i].split(" ").map(Number); weight.push(newArr[0]); // 몸무게 배열 height.push(newArr[1]); //..