티스토리 뷰

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
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/02   »
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
글 보관함