Codewars style ranking system, CodeWars Kata 자바 솔루션
Codewars style ranking system, CodeWars Kata Codewars style ranking system Write a class called User that is used to calculate the amount that a user will progress through a ranking system similar to the one Codewars uses. Business Rules: A user starts at rank -8 and can progress all the way to 8. There is no 0 (zero) rank. The next rank after -1 is 1. Users will complete activities. These activ..
Sum by Factors, CodeWars Kata 자바 솔루션
Sum by Factors, CodeWars Kata Sum by Factors Given an array of positive or negative integers I= [i1,..,in] you have to produce a sorted array P of the form [ [p, sum of all ij of I for which p is a prime factor (p positive) of ij] ...] P will be sorted by increasing order of the prime numbers. The final result has to be given as a string in Java, C#, C, C++ and as an array of arrays in other lan..
Strip Comments, CodeWars Kata 자바 솔루션
Strip Comments, CodeWars Kata Strip Comments Complete the solution so that it strips all text that follows any of a set of comment markers passed in. Any whitespace at the end of the line should also be stripped out. Example: Given an input string of: apples, pears # and bananas grapes bananas !apples The output expected would be: apples, pears grapes bananas The code would be called like so: va..
Integers: Recreation One, CodeWars Kata 자바 솔루션
Integers: Recreation One, CodeWars Kata Integers: Recreation One 1, 246, 2, 123, 3, 82, 6, 41 are the divisors of number 246. Squaring these divisors we get: 1, 60516, 4, 15129, 9, 6724, 36, 1681. The sum of these squares is 84100 which is 290 * 290. Task Find all integers between m and n (m and n integers such as 1 [[42, 2500], [246, 84100]] The form of the examples may change according to the ..
What's a Perfect Power anyway?, CodeWars Kata 자바 솔루션
What's a Perfect Power anyway?, CodeWars Kata What's a Perfect Power anyway? A perfect power is a classification of positive integers: In mathematics, a perfect power is a positive integer that can be expressed as an integer power of another positive integer. More formally, n is a perfect power if there exist natural numbers m > 1, and k > 1 such that mk = n. Your task is to check wheter a given..
Snail, CodeWars Kata 자바 솔루션
Snail, CodeWars Kata Snail Sort Given an n x n array, return the array elements arranged from outermost elements to the middle element, traveling clockwise. array = [[1,2,3], [4,5,6], [7,8,9]] snail(array) #=> [1,2,3,6,9,8,7,4,5] For better understanding, please follow the numbers of the next array consecutively: array = [[1,2,3], [8,9,4], [7,6,5]] snail(array) #=> [1,2,3,4,5,6,7,8,9] This image..