티스토리 뷰
https://www.acmicpc.net/problem/10214
10214번: Baseball
경근이는 수업 과제의 일환으로 연세대학교의 역사를 조사하고 있었다. 케케묵은 도서관 구석에서 경근이가 발견한 것은 역대 연고전의 야구경기 실황 기록문서였다. 하지만 문서를 가지고 있
www.acmicpc.net
const input = require('fs').readFileSync('./dev/stdin').toString().split('\n');
const T = +input.shift();
const answer = [];
for (let i = 0; i < T; i++) {
let Y = 0;
let K = 0;
for (let j = 0; j < 9; j++) {
const [y, k] = input.shift().split(' ').map(Number);
Y += y;
K += k;
}
if (Y == K) {
answer.push('Draw');
} else if (Y > K) {
answer.push('Yonsei');
} else {
answer.push('Korea');
}
}
console.log(answer.join('\n'));
728x90
'자료구조 알고리즘 > 백준' 카테고리의 다른 글
Node.js) 백준 10825번: 국영수 (0) | 2023.07.15 |
---|---|
Node.js) 백준 5648번: 역원소 정렬 (0) | 2023.07.15 |
Node.js) 백준 5585번: 거스름돈 (0) | 2023.07.14 |
Node.js) 백준 7567번: 그릇 (0) | 2023.07.13 |
Node.js) 백준 16988번: Baaaaaaaaaduk2 (Easy) (0) | 2023.07.11 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 로드나인
- 투포인터
- 서버개발
- DB 생성
- 면접비
- MySQL
- node.js
- 다이나믹프로그래밍
- create db
- 개발자면접
- 그래프
- 면접질문
- MOD
- 최소공통조상
- 은둔청년체험
- create databases;
- 롱베케이션
- BFS
- 다이나밍프로그래밍
- 투포인터 연습
- 동적프로그래밍
- 서버점검
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함