https://www.acmicpc.net/problem/28702 28702번: FizzBuzz FizzBuzz 문제는 $i = 1, 2, \cdots$ 에 대해 다음 규칙에 따라 문자열을 한 줄에 하나씩 출력하는 문제입니다. $i$가 $3$의 배수이면서 $5$의 배수이면 “FizzBuzz”를 출력합니다. $i$가 $3$의 배수이지만 $5$ www.acmicpc.net const input = require('fs') .readFileSync('./dev/stdin') .toString() .trim() .split('\n') .map((v) => v.trim()); for (let i = 0; i < 3; i++) { if (isNaN(Number(input[i]))) continue; else { ..
https://www.acmicpc.net/problem/28701 28701번: 세제곱의 합 $a$의 제곱은 $a$를 두 번 곱한 수로, $a^2$으로 표현합니다. $a^2 = a \times a$입니다. 또한, $a$의 세제곱은 $a$를 세 번 곱한 수로, $a^3$으로 표현합니다. $a^3 = a \times a \times a$ 입니다. www.acmicpc.net const input = +require('fs').readFileSync('./dev/stdin').toString().trim(); let answer1 = 0; let answer3 = 0; for (let i = 1; i
https://www.acmicpc.net/problem/28703 28703번: Double It $31$에 $2$를 곱해서 $62$로, $41$에 $2$를 곱해서 $82$로, $51$ 에 $2$를 곱해서 $102$로, $3$에 $2$를 $5$번 곱해서 $96$으로 만들면, $A$의 최댓값 $102$와 최솟값 $62$의 차이가 $40$으로 최소가 됩니다. www.acmicpc.net class MinHeap { constructor() { this.heap = []; } swap(a, b) { [this.heap[a], this.heap[b]] = [this.heap[b], this.heap[a]]; } size() { return this.heap.length; } push(value) { this...
https://www.acmicpc.net/problem/28437 28437번: 막대 만들기 첫 줄에 $Q$개의 수를 공백으로 구분해 출력합니다. $i$번째 수는 길이가 $L_i$인 막대를 만드는 방법의 수입니다. 가능한 모든 입력에 대해 답이 $10^9$을 넘지 않음을 증명할 수 있습니다. www.acmicpc.net const input = require('fs') .readFileSync('./dev/stdin') .toString() .trim() .split('\n') .map((v) => v.split(' ').map(Number)); const N = input[0][0]; const A = input[1]; const Q = input[2][0]; const L = input[3]; le..
https://www.acmicpc.net/problem/12354 12354번: Ocean View (Small) The first line of the input gives the number of test cases, T. T test cases follow. Each test case will consist of two lines. The first line will contain a single integer N, the number of houses on Awesome Boulevard. The next line will list the height of e www.acmicpc.net const input = require('fs') .readFileSync('./dev/stdin') .to..
https://www.acmicpc.net/problem/25644 25644번: 최대 상승 미래를 예측하는 능력이 있는 정균이는 앞으로 $N$일간 ANA 회사의 주가가 어떻게 변하는지 정확히 예측할 수 있다. 정균이는 예측한 결과를 바탕으로 ANA 회사의 주식 한 주를 적당한 시점에 사고 www.acmicpc.net const input = require('fs').readFileSync('./dev/stdin').toString().trim().split('\n'); const a = input[1].split(' ').map(Number); let now = a[0]; let gain = 0; for (let i = 1; i a[i]) { now ..
https://www.acmicpc.net/problem/19947 19947번: 투자의 귀재 배주형 2020년에 학교로 복학한 주형이는 월세를 마련하기 위해서 군 적금을 깨고 복리 투자를 하려고 한다. 주형이가 하려는 투자에는 3가지 방법의 투자 방식이 있다. 1년마다 5%의 이율을 얻는 투자 ( www.acmicpc.net dp[i] 는 i년 투자했을 때 최대 금액 조건식 eja[] = [null, 1.05, null, 1.2, null, 1.35] dp[i] = max(dp[i], dp[i-j] \* eja[j]) j = 1 또는 3 또는 5 i-j>=0 일때만 계산 초기값 dp[0]=H(원금) const [H, Y] = require('fs').readFileSync('./dev/stdin').t..
https://www.acmicpc.net/problem/14606 14606번: 피자 (Small) 예제1의 입력이 1이므로, 게임 시작부터 갑이 분리할 수 있는 피자탑이 없습니다. 따라서 갑이 얻는 즐거움은 0입니다. 예제2의 정답 3은 다음과 같은 과정을 통해 얻어집니다. 먼저 놀이를 시작 www.acmicpc.net dp[i] 는 피자 판이 i개 있을 때 느낄 수 있는 즐거움의 총합 조건식 dp[i] = Math.floor(i/2) * (i-Math.floor(i/2)) + dp[Math.floor(i/2)] + dp[(i-Math.floor(i/2))] 초기값 dp[1] = 0 dp[2] = 1 const input = +require('fs').readFileSync('./dev/stdin')..
- Total
- Today
- Yesterday
- 로드나인
- 다이나밍프로그래밍
- MySQL
- node.js
- 투포인터
- 면접비
- 서버점검
- create db
- 개발자면접
- 서버개발
- create databases;
- 은둔청년체험
- DB 생성
- 동적프로그래밍
- 롱베케이션
- 투포인터 연습
- 그래프
- BFS
- 면접질문
- MOD
- 다이나믹프로그래밍
- 최소공통조상
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |