https://www.acmicpc.net/problem/1934 1934번: 최소공배수 두 자연수 A와 B에 대해서, A의 배수이면서 B의 배수인 자연수를 A와 B의 공배수라고 한다. 이런 공배수 중에서 가장 작은 수를 최소공배수라고 한다. 예를 들어, 6과 15의 공배수는 30, 60, 90등이 있 www.acmicpc.net const fs = require('fs'); const input = fs.readFileSync("./dev/stdin").toString().trim().split("\n"); input.shift(); const nums = input.map(v => v.split(' ').map(v => +v)) nums.forEach(v => { console.log(lcm(v[0]..
https://www.acmicpc.net/problem/2609 2609번: 최대공약수와 최소공배수 첫째 줄에는 입력으로 주어진 두 수의 최대공약수를, 둘째 줄에는 입력으로 주어진 두 수의 최소 공배수를 출력한다. www.acmicpc.net const fs = require('fs'); const input = fs.readFileSync("./dev/stdin").toString().trim().split(" "); const nums = input.map(v => +v); const gcd = Euclidean(nums[0], nums[1]) console.log(gcd) const lcm = LCM(gcd, nums[0], nums[1]) console.log(lcm) function Eucli..
https://www.acmicpc.net/problem/2447 2447번: 별 찍기 - 10 재귀적인 패턴으로 별을 찍어 보자. N이 3의 거듭제곱(3, 9, 27, ...)이라고 할 때, 크기 N의 패턴은 N×N 정사각형 모양이다. 크기 3의 패턴은 가운데에 공백이 있고, 가운데를 제외한 모든 칸에 별이 www.acmicpc.net const fs = require('fs'); const [input] = fs.readFileSync("./dev/stdin").toString().trim().split(" ").map(v => +v); let Arr = Array.from(Array(input), () => Array(input).fill(' ')) function star(x, y, n, type..
https://www.acmicpc.net/problem/1037 1037번: 약수 첫째 줄에 N의 진짜 약수의 개수가 주어진다. 이 개수는 50보다 작거나 같은 자연수이다. 둘째 줄에는 N의 진짜 약수가 주어진다. 1,000,000보다 작거나 같고, 2보다 크거나 같은 자연수이고, 중복되 www.acmicpc.net const fs = require('fs'); const input = fs.readFileSync("./dev/stdin").toString().trim().split("\n"); const nums = input.map(v => v.split(' ').map(x => +x)); const factor = nums[1] if (factor.length == 1) { console.log(..
https://www.acmicpc.net/problem/5086 5086번: 배수와 약수 각 테스트 케이스마다 첫 번째 숫자가 두 번째 숫자의 약수라면 factor를, 배수라면 multiple을, 둘 다 아니라면 neither를 출력한다. www.acmicpc.net const fs = require('fs'); const input = fs.readFileSync("./dev/stdin").toString().trim().split("\n"); input.pop(); const nums = input.map(v => v.split(' ').map(x => +x)) nums.forEach(v => { if (v[1] % v[0] == 0) { console.log('factor') } else if (..
https://www.acmicpc.net/problem/10757 10757번: 큰 수 A+B 두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오. www.acmicpc.net const fs = require('fs'); const input = fs.readFileSync("./dev/stdin").toString().trim().split(" "); const [A, B] = input.map(v => BigInt(v)); console.log(String(A + B))
https://www.acmicpc.net/problem/13305 13305번: 주유소 표준 입력으로 다음 정보가 주어진다. 첫 번째 줄에는 도시의 개수를 나타내는 정수 N(2 ≤ N ≤ 100,000)이 주어진다. 다음 줄에는 인접한 두 도시를 연결하는 도로의 길이가 제일 왼쪽 도로부터 N-1 www.acmicpc.net https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/BigInt BigInt - JavaScript | MDN BigInt는 Number 원시 값이 안정적으로 나타낼 수 있는 최대치인 2^53 - 1보다 큰 정수를 표현할 수 있는 내장 객체입니다. developer.mozilla.org const..
https://www.acmicpc.net/problem/1541 const fs = require('fs'); const input = fs.readFileSync("./dev/stdin").toString().trim(); const minusSplit = input.split('-'); const minusArr = []; let answer = 0; minusSplit.forEach(v => { const plusSplit = v.split('+'); let sum = 0; plusSplit.forEach(v2 => { sum += Number(v2); }) minusArr.push(sum); }) answer = minusArr[0]; for (let i = 1; i < minusArr.leng..
- Total
- Today
- Yesterday
- create db
- 롱베케이션
- node.js
- MySQL
- DB 생성
- 서버개발
- MOD
- create databases;
- 로드나인
- 개발자면접
- 서버점검
- 동적프로그래밍
- 다이나믹프로그래밍
- 면접질문
- 최소공통조상
- BFS
- 그래프
- 투포인터
- 은둔청년체험
- 투포인터 연습
- 면접비
- 다이나밍프로그래밍
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |