Lonpeach Tech

게임 개발 이슈 정리

[Codewars #20] Steps in Primes (6kyu)

[Codewars #20] Steps in Primes (6kyu) 문제 풀이

Instructions The prime numbers are not regularly spaced. For example from 2 to 3 the step is 1. From 3 to 5 the step is 2. From 7 to 11 it is 4. Between 2 and 50 we have the following pairs of 2-s...

[Codewars #19] Build Tower (6kyu)

[Codewars #19] Build Tower (6kyu) 문제 풀이

Instructions The prime numbers are not regularly spaced. For example from 2 to 3 the step is 1. From 3 to 5 the step is 2. From 7 to 11 it is 4. Between 2 and 50 we have the following pairs of 2-s...

[Codewars #18] Maximum Length Difference (7kyu)

[Codewars #18] Maximum Length Difference (7kyu) 문제 풀이

Instructions You are given two arrays a1 and a2 of strings. Each string is composed with letters from a to z. Let x be any string in the first array and y be any string in the second array. Find ...

[Codewars #17] Speed Control (7kyu)

[Codewars #17] Speed Control (7kyu) 문제 풀이

Instructions In John’s car the GPS records every s seconds the distance travelled from an origin (distances are measured in an arbitrary but consistent unit). For example, below is part of a recor...

[Codewars #16] Vasya - Clerk (6kyu)

[Codewars #16] Vasya - Clerk (6kyu) 문제 풀이

Instructions The new “Avengers” movie has just been released! There are a lot of people at the cinema box office standing in a huge line. Each of them has a single 100, 50 or 25 dollars bill. An “...

[Codewars #15] Are they the same? (6kyu)

[Codewars #15] Are they the same? (6kyu) 문제 풀이

Instructions Given two arrays a and b write a function comp(a, b) (compSame(a, b) in Clojure) that checks whether the two arrays have the “same” elements, with the same multiplicities. “Same” mean...

[Codewars #14] Sum of a sequence (7kyu)

[Codewars #14] Sum of a sequence (7kyu) 문제 풀이

Instructions Your task is to make function, which returns the sum of a sequence of integers. The sequence is defined by 3 non-negative values: begin, end, step. If begin value is greater than th...

[Codewars #13] Help the bookseller (6kyu)

[Codewars #13] Help the bookseller (6kyu) 문제 풀이

Instructions A bookseller has lots of books classified in 26 categories labeled A, B, … Z. Each book has a code c of 3, 4, 5 or more capitals letters. The 1st letter of a code is the capital lette...

[Codewars #12] Factorial (7kyu)

[Codewars #12] Factorial (7kyu) 문제 풀이

Instructions In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example: 5! = 5 * 4 * 3 * 2 * 1 = 120. B...

[Codewars #11] Who likes it? (6kyu)

[Codewars #11] Who likes it? (6kyu) 문제 풀이

Instructions You probably know the “like” system from Facebook and other pages. People can “like” blog posts, pictures or other items. We want to create the text that should be displayed next to s...