728x90
const fs = require('fs');
const [n, ...arr] = fs.readFileSync("/dev/stdin").toString().trim().split(/\s/);
const scores = arr.map(Number)
const MAX = Math.max(...scores)
let avg = 0;
scores.forEach((s, i) => {
scores[i] = (s/MAX)*100
avg += scores[i];
})
console.log(avg/Number(n))
728x90
'Development > 코딩테스트' 카테고리의 다른 글
[백준] 15829 Node.js (1) | 2022.09.27 |
---|---|
[백준] 2577 Node.js (1) | 2022.09.26 |
[백준] 1152 Node.js (0) | 2022.09.24 |
[백준] 10250 Node.js (0) | 2022.09.24 |
[백준] 15552 Node.js (0) | 2022.09.23 |
댓글