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 | 31 |
Tags
- ๊ตฌ๋ฆํค
- emotion RSC
- TypeError: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more:
- ์นด์นด์ค ์ฝํ
- ์ฌ์ฉ์ฑ ๊ฐ์
- suspense ๋์์๋ฆฌ
- js
- js ๋ฌธ์์ด ์์ถ
- ๋ฐฑ์ค 1339๋ฒ nodejs
- ์ต์ ๋์ฒด์ด๋
- ์๋ฐ์คํฌ๋ฆฝํธ ๋ฌธ์์ด ์์ถ
- emtion app router
- ๋ฆฌ์กํธ์ฟผ๋ฆฌ suspense
- ๋ฐฑ์ค 1339๋ฒ js
- suspense react-query
- ๋ฐฑ์ค 2108 nodejs
- suspense ๋ณ๋ชฉํ์
- ๊ตฌ๋ฆํค ์ฑ๋ฆฐ์ง
- ๊ตฌ๋ฆํค ์ฑ๋ฆฐ์ง ํ๊ณ
- ๋ฐฑ์ค 1339๋ฒ ์๋ฐ์คํฌ๋ฆฝํธ
- ํ๋ก๊ทธ๋๋จธ์ค ๋ฌธ์์ด ์์ถ
- ํ๋ก๊ทธ๋๋จธ์ค ๊ฑฐ๋ฆฌ๋๊ธฐ ํ์ธํ๊ธฐ
- app router emotion
- ์๋ฐ์คํฌ๋ฆฝํธ ์ค์ฝํ
- ์ค์ฝํ
- ๋ฐฑ์ค 2108 ์๋ฐ์คํฌ๋ฆฝํธ
- suspense ๋น๋๊ธฐ
- js ๊ฑฐ๋ฆฌ๋๊ธฐ ํ์ธํ๊ธฐ
- js ์ค์ฝํ
- next13 emotion
Archives
- Today
- Total
Lennon FE
[๋ฐฑ์ค 1546๋ฒ] ํ๊ท - ์๋ฐ์คํฌ๋ฆฝํธ(nodejs) ๋ณธ๋ฌธ
๐ฅ Algorithm/Baekjoon
[๋ฐฑ์ค 1546๋ฒ] ํ๊ท - ์๋ฐ์คํฌ๋ฆฝํธ(nodejs)
Lennon 2022. 1. 17. 01:53728x90
๋ฐ์ํ
https://www.acmicpc.net/problem/1546
1546๋ฒ: ํ๊ท
์ฒซ์งธ ์ค์ ์ํ ๋ณธ ๊ณผ๋ชฉ์ ๊ฐ์ N์ด ์ฃผ์ด์ง๋ค. ์ด ๊ฐ์ 1000๋ณด๋ค ์๊ฑฐ๋ ๊ฐ๋ค. ๋์งธ ์ค์ ์ธ์ค์ด์ ํ์ฌ ์ฑ์ ์ด ์ฃผ์ด์ง๋ค. ์ด ๊ฐ์ 100๋ณด๋ค ์๊ฑฐ๋ ๊ฐ์ ์์ด ์๋ ์ ์์ด๊ณ , ์ ์ด๋ ํ๋์ ๊ฐ์ 0๋ณด
www.acmicpc.net
const fs = require('fs');
let input = fs
.readFileSync('/dev/stdin')
.toString()
.trim()
.split('\n');
const count = +input[0];
let score = input[1].split(' ').map((v) => +v);
const max = Math.max(...score);
score = score.map((v) => (v / max) * 100);
console.log(score.reduce((prev, cur) => prev + cur, 0) / count);
์ธํ์ด ์ด๋ ๊ฒ ๋ค์ด์ค๋ฏ๋ก
์ฒซ ๋ฒ์งธ ์ ๋ ฅ => ๋ง์ง๋ง์ ๋๋ ์
๋ ๋ฒ์งธ ์ ๋ ฅ => ์ฒ๋ฆฌํ์ฌ ๋ค ๋ํ ์ ์ด๋ฏ๋ก
์์ ์ฝ๋์ ๊ฐ์ด ์์ฑํ๋ฉด ๋๋ค.
728x90
๋ฐ์ํ
'๐ฅ Algorithm > Baekjoon' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Comments