![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
codewars
sjtubn
这个作者很懒,什么都没留下…
展开
-
[codewars][python][C++]Mumbling
This time no story, no theory. The examples below show you how to write function accum:Examples:accum("abcd") -> "A-Bb-Ccc-Dddd"accum("RqaEzty") -> "R-Qq-Aaa-Eeee-Zzzzz-Tttttt-Yyyyyyy"acc...原创 2019-02-22 12:48:03 · 363 阅读 · 0 评论 -
[codewars][C++]Sum of a sequence
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 the end, function s...原创 2019-02-22 15:44:27 · 288 阅读 · 0 评论 -
[codewars][python]Total amount of points
Our football team finished the championship. The result of each match look like "x:y". Results of all matches are recorded in the collection.For example: ["3:1", "2:2", "0:1", ...]Write a function...原创 2019-02-19 10:55:36 · 625 阅读 · 0 评论 -
[codewars][python]Suitcase packing
Mr. Square is going on a holiday. He wants to bring 2 of his favorite squares with him, so he put them in his rectangle suitcase.Write a function that, given the size of the squares and the suitcase...原创 2019-02-19 14:29:33 · 290 阅读 · 0 评论 -
[codewars][python]Squares in a Rectangle
A rectangle can be split up into a grid of 1x1 squares, the amount of which being equal to the product of the two dimensions of the rectangle. Depending on the size of the rectangle, that grid of 1x1 ...原创 2019-02-19 16:50:56 · 188 阅读 · 0 评论 -
[codewars][python]IP Validation
Write an algorithm that will identify valid IPv4 addresses in dot-decimal format. IPs should be considered valid if they consist of four octets, with values between 0 and 255, inclusive.Input to the...原创 2019-02-19 17:16:35 · 335 阅读 · 0 评论 -
[codewars][python][C++]Even numbers in an array
Given an array of digitals numbers, return a new array of length number containing the last even numbers from the original array (in the same order). The original array will be not empty and will cont...原创 2019-02-20 13:12:42 · 179 阅读 · 0 评论 -
[codewars][python][C++]Count the Digit
Take an integer n (n >= 0) and a digit d (0 <= d <= 9) as an integer. Square all numbers k (0 <= k <= n) between 0 and n. Count the numbers of digits d used in the writing of all the k*...原创 2019-02-21 10:50:56 · 338 阅读 · 0 评论