본문 바로가기

JavaScript554

[백준] 7891: Can you add this? / Node.js (JavaScript) https://www.acmicpc.net/problem/7891 7891번: Can you add this? The input contains several test cases. The first line contains and integer t (t ≤ 100) denoting the number of test cases. Then t tests follow, each of them consisiting of two space separated integers x and y (−109 ≤ x, y ≤ 109). www.acmicpc.net 문제 Given two integers, calculate and output their sum. 입력 The input contains several test c.. 2023. 4. 27.
[백준] 5341: Pyramids / Node.js (JavaScript) https://www.acmicpc.net/problem/5341 5341번: Pyramids The input will be a sequence of integers, one per line. The end of input will be signaled by the integer 0, and does not represent the base of a pyramid. All integers, other than the last (zero), are positive. www.acmicpc.net 문제 A pyramid of blocks is constructed by first building a base layer of n blocks and then adding n-1 blocks to the next.. 2023. 4. 27.
[Codewars] validate code with simple regex (8 kyu) / JavaScript https://www.codewars.com/kata/56a25ba95df27b7743000016 Codewars - Achieve mastery through coding practice and developer mentorship A coding practice website for all programming levels – Join a community of over 3 million developers and improve your coding skills in over 55 programming languages! www.codewars.com DESCRIPTION: Basic regex tasks. Write a function that takes in a numeric code of any.. 2023. 4. 27.
[백준] 11729: 하노이 탑 이동 순서 / Node.js (JavaScript) https://www.acmicpc.net/problem/11729 11729번: 하노이 탑 이동 순서 세 개의 장대가 있고 첫 번째 장대에는 반경이 서로 다른 n개의 원판이 쌓여 있다. 각 원판은 반경이 큰 순서대로 쌓여있다. 이제 수도승들이 다음 규칙에 따라 첫 번째 장대에서 세 번째 장대로 www.acmicpc.net 문제 세 개의 장대가 있고 첫 번째 장대에는 반경이 서로 다른 n개의 원판이 쌓여 있다. 각 원판은 반경이 큰 순서대로 쌓여있다. 이제 수도승들이 다음 규칙에 따라 첫 번째 장대에서 세 번째 장대로 옮기려 한다. 한 번에 한 개의 원판만을 다른 탑으로 옮길 수 있다. 쌓아 놓은 원판은 항상 위의 것이 아래의 것보다 작아야 한다. 이 작업을 수행하는데 필요한 이동 순서를 출력하는 프로그.. 2023. 4. 27.