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
- TypeError: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more:
- ํ๋ก๊ทธ๋๋จธ์ค ๊ฑฐ๋ฆฌ๋๊ธฐ ํ์ธํ๊ธฐ
- ์ค์ฝํ
- ํ๋ก๊ทธ๋๋จธ์ค ๋ฌธ์์ด ์์ถ
- ์๋ฐ์คํฌ๋ฆฝํธ ์ค์ฝํ
- js ์ค์ฝํ
- suspense react-query
- ๋ฐฑ์ค 2108 ์๋ฐ์คํฌ๋ฆฝํธ
- suspense ๋ณ๋ชฉํ์
- ๊ตฌ๋ฆํค
- emotion RSC
- app router emotion
- ์นด์นด์ค ์ฝํ
- ๋ฐฑ์ค 1339๋ฒ js
- js ๊ฑฐ๋ฆฌ๋๊ธฐ ํ์ธํ๊ธฐ
- suspense ๋์์๋ฆฌ
- ๊ตฌ๋ฆํค ์ฑ๋ฆฐ์ง
- suspense ๋น๋๊ธฐ
- ์ต์ ๋์ฒด์ด๋
- emtion app router
- ์ฌ์ฉ์ฑ ๊ฐ์
- js
- ๋ฐฑ์ค 2108 nodejs
- ๋ฐฑ์ค 1339๋ฒ nodejs
- ๋ฆฌ์กํธ์ฟผ๋ฆฌ suspense
- next13 emotion
- js ๋ฌธ์์ด ์์ถ
- ์๋ฐ์คํฌ๋ฆฝํธ ๋ฌธ์์ด ์์ถ
- ๋ฐฑ์ค 1339๋ฒ ์๋ฐ์คํฌ๋ฆฝํธ
- ๊ตฌ๋ฆํค ์ฑ๋ฆฐ์ง ํ๊ณ
Archives
- Today
- Total
Lennon FE
[๋ฐฑ์ค 1546๋ฒ] ํ๊ท - ์๋ฐ์คํฌ๋ฆฝํธ(nodejs) ๋ณธ๋ฌธ
๐ฅ Algorithm/Baekjoon
[๋ฐฑ์ค 1546๋ฒ] ํ๊ท - ์๋ฐ์คํฌ๋ฆฝํธ(nodejs)
Lennon 2022. 1. 17. 01:53728x90
๋ฐ์ํ
https://www.acmicpc.net/problem/1546
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