์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
- ๋ฐฑ์ค 1339๋ฒ ์๋ฐ์คํฌ๋ฆฝํธ
- next13 emotion
- ๊ตฌ๋ฆํค
- ์๋ฐ์คํฌ๋ฆฝํธ ๋ฌธ์์ด ์์ถ
- suspense ๋์์๋ฆฌ
- js
- ๋ฆฌ์กํธ์ฟผ๋ฆฌ suspense
- suspense react-query
- app router emotion
- suspense ๋ณ๋ชฉํ์
- ๋ฐฑ์ค 2108 nodejs
- ์ต์ ๋์ฒด์ด๋
- ํ๋ก๊ทธ๋๋จธ์ค ๊ฑฐ๋ฆฌ๋๊ธฐ ํ์ธํ๊ธฐ
- ๋ฐฑ์ค 1339๋ฒ nodejs
- emotion RSC
- ๊ตฌ๋ฆํค ์ฑ๋ฆฐ์ง
- ์ค์ฝํ
- ํ๋ก๊ทธ๋๋จธ์ค ๋ฌธ์์ด ์์ถ
- ๋ฐฑ์ค 1339๋ฒ js
- ๊ตฌ๋ฆํค ์ฑ๋ฆฐ์ง ํ๊ณ
- ์๋ฐ์คํฌ๋ฆฝํธ ์ค์ฝํ
- js ๊ฑฐ๋ฆฌ๋๊ธฐ ํ์ธํ๊ธฐ
- emtion app router
- js ์ค์ฝํ
- 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 ๋ฌธ์์ด ์์ถ
- ์นด์นด์ค ์ฝํ
- ๋ฐฑ์ค 2108 ์๋ฐ์คํฌ๋ฆฝํธ
- Today
- Total
๋ชฉ๋ก๐ฅ Algorithm/Algorithm Retrospect (2)
Lennon FE
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/Dtoot/btrrJtIsRBz/e2Udf7AmhnLdvKkKfuMC10/img.png)
https://www.acmicpc.net/problem/2108 2108๋ฒ: ํต๊ณํ ์ฒซ์งธ ์ค์ ์์ ๊ฐ์ N(1 ≤ N ≤ 500,000)์ด ์ฃผ์ด์ง๋ค. ๋จ, N์ ํ์์ด๋ค. ๊ทธ ๋ค์ N๊ฐ์ ์ค์๋ ์ ์๋ค์ด ์ฃผ์ด์ง๋ค. ์ ๋ ฅ๋๋ ์ ์์ ์ ๋๊ฐ์ 4,000์ ๋์ง ์๋๋ค. www.acmicpc.net const fs = require('fs'); let input = fs.readFileSync('dev/stdin').toString().trim().split('\n'); input.shift(); input = input.map((v) => +v).sort((a, b) => a - b); // ํ๊ท console.log(Math.round(input.reduce((prev, cur) => prev + cu..
substring๊ณผ slice ํ์ฉํ๋ฉด์ ๋๋ ์ ์ด๋ค ๋ฌธ์ ๊ฐ ๊ณ์ ๋ช ๊ฐ๊ฐ ํ๋ฆฌ๋ ์ํฉ์ด ๋ฐ์ํ๋ค. ์ด๋ ต์ง ์์ ๋ฌธ์ ๋ผ ๋ก์ง์ ๋ฌธ์ ๊ฐ ์์๊ณ ๊ณ ๋ฏผํ๋์ฐจ ๋ฌธ์ ์ ์ ์ฐพ์๋ค. ๋ฐฐ์ด arr = [1, 2, 4, 5] ๊ฐ ์์ด์ 4์5, 1๊ณผ2๋ฅผ ๋ฐ๋๋ก ์ ๋ ฌํ๊ณ ๋ฌธ์์ด๋ก ๋ฆฌํดํ๊ณ ์ถ๋ค. ๊ทธ๋ฌ๋ฉด 0~2๊น์ง ์๋ฅด๊ณ , 3~ ์๋ฅธ ๊ฑธ ๋ถ์ฌ์ฃผ๋ฉด ๋๋ค. ๊ทธ๋ผ ๊ฒฐ๊ณผ์ ์ผ๋ก '4512'๊ฐ ๋ ๊ฒ์ด๋ค. ์ด๋ slice ํ join์ ํ๋ join์ ํ๊ณ substring์ ํด๋ ์๊ด์ด ์๋ค. (๋ฌผ๋ก ์๋ก์ด ๋ฐฐ์ด์ ๋ง๋ค๊ณ ์๋ณธ ๋ฐฐ์ด์ ๋ณด์กดํด์ผํจ) ๊ทธ๋ฌ๋ ๋ฐฐ์ด ๋ด์ ์์๋ 10์ ์๋ฆฌ ์ด์์ ์๊ฐ ์๋ค๋ฉด ๋ง์ด ๋ฌ๋ผ์ง๋ค. ์ด๋ substring์ ํ๋ฉด ์ํ๋ ๊ฐ์ ๊ฐ์ง ์ ์์ ๊ฒ์ด๋ค. ๋ฐฐ์ด๋ก ์ฃผ์ด์ง๋ฉด ๋ฌด์กฐ๊ฑด slice๋ฅผ ์ฌ์ฉํ๋๋ก ํ์