본문 바로가기

전체 글

(250)
<-- --> 로 이루어진 줄바꿈 포함 주석 찾는 정규식 이다.
Extra Long Factorials javascript 번역 및 풀이 원문 및 번역 The factorial of the integer n, written n!, is defined as: 정수 n의 팩토리얼은 n!로 쓰며, 다음과 같이 정의한다. n! = n * (n-1) * (n-2) * … 3 * 2 * 1 Calculate and print the factorial of a given integer. 주어진 정수의 팩토리얼을 계산하여 출력한다. For example, if , we calculate and get . 예를들어, n=30이면, 30*29*…2*1 을 계산하고 결과로265252859812191058636308480000000 를 얻을 수 있다. Function Description Complete the extraLongFactorials functio..
TITLE
단 한줄로 자바스크립트 배열 중복값 제거하는 방법 배열을 순회하면서 중복값인지 아닌지 체크하는 로직 reduce가 있지만 그건 매우 매우 매우 느리다. 중복값 제거 로직은 arr이 배열이라고 했을때 arr = Array.from(new Set(arr)); 이거 한줄로 끝난다. 훨씬 빠르다. 이걸 쓰자.
Climbing the Leaderboard javascript 번역 및 풀이 원문 Alice is playing an arcade game and wants to climb to the top of the leaderboard and wants to track her ranking. The game uses Dense Ranking, so its leaderboard works like this: The player with the highest score is ranked number 1 on the leaderboard. Players who have equal scores receive the same ranking number, and the next player(s) receive the immediately following ranking number. For exam..
Forming a Magic Square hackerrank 자바스크립트 번역 및 풀이 원문 We define a magic square to be an n x n matrix of distinct positive integers from 1 to n^2 where the sum of any row, column, or diagonal of length is always equal to the same number: the magic constant. You will be given a 3 x 3 matrix s of integers in the inclusive range [1,9]. We can convert any digit a to any other digit b in the range [1,9] at cost of [a-b]. Given s, convert it into a mag..
[15.8.4]오늘의 일과 민재형 집에서 졸프를 도왔다. 혼자 3주동안 고민한걸 내가 도와 하루만에 끝냈다고 좋아하셨다.
[15.7.28]]PHP를 사용하는 이유 HTML은 페이지를 실행한 사용자의 컴퓨터에서 작동하기때문에 해당 사용자의 환경에 따라 오류가 발생할 수 있다. PHP는 페이지가 업로드 되어있는 서버에서 작동하기 때문에 안정적이고 일관되게 명령을 수행할 수 있다.