1620번: 나는야 포켓몬 마스터 이다솜 첫째 줄에는 도감에 수록되어 있는 포켓몬의 개수 N이랑 내가 맞춰야 하는 문제의 개수 M이 주어져. N과 M은 1보다 크거나 같고, 100,000보다 작거나 같은 자연수인데, 자연수가 뭔지는 알지? 모르면 www.acmicpc.net // 1. const fs = require('fs'); const input = fs.readFileSync('/dev/stdin').toString().trim().split('\n'); const [N, M] = input.shift().split(' ').map(num => parseInt(num)); // 2. const orders = input.slice(0, N); const questions = input.slice(..
2292번: 벌집 위의 그림과 같이 육각형으로 이루어진 벌집이 있다. 그림에서 보는 바와 같이 중앙의 방 1부터 시작해서 이웃하는 방에 돌아가면서 1씩 증가하는 번호를 주소로 매길 수 있다. 숫자 N이 주어졌 www.acmicpc.net // 1. const fs = require('fs'); const input = parseInt(fs.readFileSync('/dev/stdin').toString().trim()); // 2. function* multi() { let result = 1, idx = 1, mul = 1; while (true) { result += mul; yield result; mul = idx * 6; idx++; } } // 3. let result = 0; switch (..
15829번: Hashing APC에 온 것을 환영한다. 만약 여러분이 학교에서 자료구조를 수강했다면 해시 함수에 대해 배웠을 것이다. 해시 함수란 임의의 길이의 입력을 받아서 고정된 길이의 출력을 내보내는 함수로 정 www.acmicpc.net // 1. const fs = require('fs'); const [L, str] = fs.readFileSync('/dev/stdin').toString().trim().split('\n'); const arr = Array.from(str); // 2. const r = 31n; const M = 1234567891n; // 3. let result = 0n; let pow = BigInt(1); for(let i=0;i= M) result %= M; co..
2869번: 달팽이는 올라가고 싶다 첫째 줄에 세 정수 A, B, V가 공백으로 구분되어서 주어진다. (1 ≤ B < A ≤ V ≤ 1,000,000,000) www.acmicpc.net // 1. const fs = require('fs'); const [a, b, v] = fs.readFileSync('/dev/stdin').toString().trim().split(' '); // 2. const day = a - b; const target = v - a; // 3. const result = Math.ceil(target / day) + 1; console.log(result); 구조 분해 할당을 통해 필요한 값 a, b, v를 초기화한다. 달팽이가 하루에 올라갈 수 있는 거리와, 달팽이가 올라..
How JavaScript works: an overview of the engine, the runtime, and the call stack As JavaScript is getting more and more popular, teams are leveraging its support on many levels in their stack - front-end, back-end… blog.sessionstack.com 참고용 글
10815번: 숫자 카드 첫째 줄에 상근이가 가지고 있는 숫자 카드의 개수 N(1 ≤ N ≤ 500,000)이 주어진다. 둘째 줄에는 숫자 카드에 적혀있는 정수가 주어진다. 숫자 카드에 적혀있는 수는 -10,000,000보다 크거나 같고, 10, www.acmicpc.net // 1. const fs = require('fs'); const [ , card, , check ] = fs.readFileSync('/dev/stdin').toString().trim().split('\n'); const deck = new Set(card.split(' ')); const targets = check.split(' '); // 2. let result = []; for(const target of targets..
11399번: ATM 첫째 줄에 사람의 수 N(1 ≤ N ≤ 1,000)이 주어진다. 둘째 줄에는 각 사람이 돈을 인출하는데 걸리는 시간 Pi가 주어진다. (1 ≤ Pi ≤ 1,000) www.acmicpc.net // 1. const fs = require('fs'); let [ first, second ] = fs.readFileSync('/dev/stdin') .toString() .trim() .split('\n'); let rest = second .split(' ') .map(elem => parseInt(elem)) .sort((a, b) => a - b); let result = 0; // 2. rest.reduce((acc, curr) => { const sum = acc + curr; ..
1181번: 단어 정렬 첫째 줄에 단어의 개수 N이 주어진다. (1 ≤ N ≤ 20,000) 둘째 줄부터 N개의 줄에 걸쳐 알파벳 소문자로 이루어진 단어가 한 줄에 하나씩 주어진다. 주어지는 문자열의 길이는 50을 넘지 않는다. www.acmicpc.net const fs = require('fs'); // 1. let [ first, ...rest] = fs.readFileSync('/dev/stdin').toString().trim().split('\n'); // 2. rest.sort((a, b) => { if(a.length > b.length) { return 1; } else if(a.length < b.length) { return -1; } else { return 0; } }); // 3..
- Total
- Today
- Yesterday
- eureka
- Vault
- hashicorp
- Java
- postgresql
- terraform
- shell
- Database
- pgloader
- react
- jQuery
- Spring Cloud Config
- mysql
- AWS
- Docker
- Git
- Gradle
- Linux
- 코딩테스트
- etc
- Node.js
- Puppeteer
- spring boot
- JPA
- AWS IoT
- IntelliJ
- kotlin
- javascript
- JEST
- RancherDesktop
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |