본문 바로가기

코딩공부4

[CodeWars] javascript - 7kyu - Disemvowel Trolls 문제풀이 Title Disemvowel Trolls Description Trolls are attacking your comment section! A common way to deal with this situation is to remove all of the vowels from the trolls' comments, neutralizing the threat. Your task is to write a function that takes a string and return a new string with all vowels removed. For example, the string "This website is for losers LOL!" would become "Ths wbst s fr lsrs LL.. 2020. 4. 27.
[CodeWars] javascript - 7kyu - Largest 5 digit number in a series 문제풀이 Title Largest 5 digit number in a series Description Description: In the following 6 digit number: 283910 91 is the greatest sequence of 2 consecutive digits. In the following 10 digit number: 1234567890 67890 is the greatest sequence of 5 consecutive digits. Complete the solution so that it returns the greatest sequence of five consecutive digits found within the number given. The number will b.. 2020. 4. 24.
[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 - 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.