백준 2798 Node1 [백준] 2798 Node.js const fs = require('fs'); const input = fs.readFileSync("/dev/stdin").toString().trim().split("\n"); const [N, M] = input[0].split(" ").map(Number); let arr = input[1].split(" ").map(Number); arr = arr.sort((a, b) => a-b) let result = 0; let sum = 0; for (let i = 0; i =0 && result 2022. 9. 30. 이전 1 다음