본문 바로가기
Development/코딩테스트

[백준] 10039 Node.js

by Yeony99 2022. 9. 21.
728x90
const fs = require('fs');
const input = fs.readFileSync("/dev/stdin").toString().trim().split("\n").map(Number);

let sum = 0;
for(let i=0; i <5; i++) {
    sum += input[i] < 40 ? 40 : input[i];
}
console.log(sum/5);
728x90

'Development > 코딩테스트' 카테고리의 다른 글

[백준] 1157 Node  (0) 2022.09.22
[백준] 3003 Node.js  (1) 2022.09.22
[백준] 8958 Node.js  (0) 2022.09.21
[백준] 2920 Node.js  (0) 2022.09.21
[백준] 2675 Node.js  (0) 2022.09.21

댓글