[TIL] 수학 알고리즘 문제 풀이, SocketIO, WebRTC 강의
백준 1011
https://www.acmicpc.net/problem/1011
const fs = require('fs')
const input = fs.readFileSync('dev/stdin').toString().trim().split('\n')
const [num, ...testCases] = input
for (let i = 0; i < +num; i++) {
const [start, end] = testCases[i].split(' ').map((x) => +x)
let distance = end - start
let k = 1
let count = 0
while (distance > k * 2) {
distance -= k * 2
k++
count += 2
}
if (distance <= k) {
console.log(count + 1)
} else {
console.log(count + 2)
}
}
이외에도 수학 알고리즘 문제 6개 더 풀이
https://github.com/fancyers/coding-test
줌 클론코딩 강의
SocketIO 파트 마무리
WebRTC 파트 시작
https://github.com/fancyers/zoom
Author And Source
이 문제에 관하여([TIL] 수학 알고리즘 문제 풀이, SocketIO, WebRTC 강의), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@fancyer/TIL-n1zopp88저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)