반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- BFS
- 타입스크립트
- Node.js
- 수학
- 알고리즘
- TCP
- HTTP
- 백준
- 프로그래머스
- 프로그래머스 레벨 2
- javascript
- HTTP 완벽 가이드
- ip
- 가천대
- 쉬운 문제
- Crawling
- 레벨 1
- socket
- type challenge
- Algorithm
- Nestjs
- 소켓
- 그래프
- 자바스크립트
- dp
- typescript
- dfs
- 문자열
- 크롤링
- 타입 챌린지
Archives
- Today
- Total
kakasoo
[node.js] 럭비 클럽 ( 백준 2083번 ) 본문
반응형
const readline = require("readline");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
rl.on("line", (line) => {
if (line === "# 0 0") {
rl.close();
}
main(line);
}).on("close", () => {
process.exit();
});
/**
*
* @param {string} line
*/
const main = (line) => {
const [name, age, weight] = line.split(" ");
if (age > 17 || weight >= 80) {
console.log(`${name} Senior`);
} else {
console.log(`${name} Junior`);
}
};
반응형
'프로그래밍 > 알고리즘 풀이' 카테고리의 다른 글
[node.js] 지능형 기차 2 ( 백준 2460번 ) (0) | 2021.04.06 |
---|---|
[node.js] 숫자놀이 ( 백준 2145번 ) (0) | 2021.04.06 |
[node.js] 16진수 ( 백준 1550번 ) (0) | 2021.04.06 |
[node.js] 뒤집힌 덧셈 ( 백준 1357번 ) (0) | 2021.04.06 |
[node.js] 2진수 8진수 ( 백준 1373번 ) (0) | 2021.04.05 |