티스토리 뷰
https://www.acmicpc.net/problem/8932
8932번: 7종 경기
민혁이는 한국에서 열리는 7종 경기 대회에 참가한다. 7종 경기는 육상의 필드 경기와 트랙 경기 7 종목으로 이루어져 있다. (100미터 허들, 높이뛰기, 포환던지기, 200미터 달리기, 멀리뛰기, 창던
www.acmicpc.net
const input = require('fs')
.readFileSync('./dev/stdin')
.toString()
.trim()
.split('\n')
.map((v) => v.split(' ').map(Number));
const [N] = input.shift();
const answer = [];
for (let i = 0; i < N; i++) {
const score = input.shift();
let total = 0;
total += Math.floor(9.23076 * Math.pow(26.7 - score[0], 1.835));
total += Math.floor(1.84523 * Math.pow(score[1] - 75, 1.348));
total += Math.floor(56.0211 * Math.pow(score[2] - 1.5, 1.05));
total += Math.floor(4.99087 * Math.pow(42.5 - score[3], 1.81));
total += Math.floor(0.188807 * Math.pow(score[4] - 210, 1.41));
total += Math.floor(15.9803 * Math.pow(score[5] - 3.8, 1.04));
total += Math.floor(0.11193 * Math.pow(254 - score[6], 1.88));
answer.push(total);
}
console.log(answer.join('\n'));
728x90
'자료구조 알고리즘 > 백준' 카테고리의 다른 글
Node.js) 백준 1917번: 정육면체 전개도 (0) | 2023.08.05 |
---|---|
Node.js) 백준 23289번: 온풍기 안녕! (0) | 2023.08.04 |
Node.js) 백준 2743번: 단어 길이 재기 (0) | 2023.08.02 |
Node.js) 백준 28417번: 스케이트보드 (0) | 2023.08.01 |
Golfscript) 백준 1809번: Moo (0) | 2023.08.01 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 그래프
- 면접비
- 서버개발
- 로드나인
- create db
- MySQL
- 롱베케이션
- 면접질문
- BFS
- DB 생성
- 투포인터 연습
- 다이나밍프로그래밍
- 최소공통조상
- 은둔청년체험
- 동적프로그래밍
- 다이나믹프로그래밍
- node.js
- 개발자면접
- 투포인터
- MOD
- create databases;
- 서버점검
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함