본문 바로가기

전체 글56

[CodeWars] javascript - 7kyu - Growth Of Population 문제풀이 Title Growth Of Population Description In a small town the population is p0 = 1000 at the beginning of a year. The population regularly increases by 2 percent per year and moreover 50 new inhabitants per year come to live in the town. How many years does the town need to see its population greater or equal to p = 1200 inhabitants? At the end of the first year there will be: 1000 + 1000 * 0.02 + .. 2020. 4. 14.
[CodeWars] javascript - 8kyu - Find the first non-consecutive number 문제풀이 Title Find the first non-consecutive number Description Your task is to find the first element of an array that is not consecutive. By not consecutive we mean not exactly 1 larger than the previous element of the array. E.g. If we have an array [1,2,3,4,6,7,8] then 1 then 2 then 3 then 4 are all consecutive but 6 is not, so that's the first non-consecutive number. If the whole array is consecuti.. 2020. 4. 13.
[CodeWars] javascript - 6kyu - Sum of Digits / Digital Root 문제풀이 Title Sum of Digits / Digital Root Description In this kata, you must create a digital root function. A digital root is the recursive sum of all the digits in a number. Given n, take the sum of the digits of n. If that value has more than one digit, continue reducing in this way until a single-digit number is produced. This is only applicable to the natural numbers. Here's how it works: digital_.. 2020. 4. 12.
[GIT] 파일 내용 확인하기 기본 명령어 cat : 파일 내용 확인 명령어 기능 cat 명령어 원형 : cat [파일 이름] 파일안에 작성된 내용을 확인 할 수 있다. 작성된 내용은 Prompt창에 나타난다. 파일 내용에 수정 사항이 발생한 경우, vi [파일 이름] 을 통해서 내용을 수정 할 수 있다. (저는 vi 편집기를 사용하고 있습니다.) 2020. 4. 11.