![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
codewars
文章平均质量分 79
哆啦AA梦
这个作者很懒,什么都没留下…
展开
-
codewars算法题(求因子)
今天发现了一个练习python的网站codewars,打算通过它来做一些算法题,来提高自己分析问题解决问题熟练掌握python语言的能力,以下是第一个算法:Create a function named divisors that takes an integer and returns an array with all of the integer's divisors(excep原创 2017-07-24 10:14:52 · 511 阅读 · 0 评论 -
codewars算法题(找零钱)
此题为codewars中的一个算法题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 bil原创 2017-07-24 11:16:16 · 538 阅读 · 0 评论 -
codewars算法题(3)
第三题:问题: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 such原创 2017-07-24 14:48:40 · 922 阅读 · 1 评论 -
Codewars算法题(4)
第七题:(3和5的倍数)问题: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.Finish the solution so that it returns the sum of原创 2017-07-25 08:32:54 · 2501 阅读 · 0 评论 -
Codewars算法题(5)
第18题:(printer_error)问题:In a factory a printer prints labels for boxes. For one kind of boxes the printer has to use colors which, for the sake of simplicity, are named with letters from a to原创 2017-07-26 09:18:09 · 993 阅读 · 0 评论 -
Codewars算法题(6)
第20题(字母排序问题)问题:Move the first letter of each word to the end of it, then add 'ay' to the end of the word.pig_it('Pig latin is cool') # igPay atinlay siay oolcay问题陈述:其实就是将字符串中的每一个单词的首字母移到最后原创 2017-07-26 13:37:23 · 1192 阅读 · 0 评论 -
Codewars算法题(7)
第23题:(Convert string to camel case)问题:Complete the method/function so that it converts dash/underscore delimited words into camel casing. The first word within the output should be capitalized原创 2017-07-27 09:50:10 · 885 阅读 · 0 评论 -
Codewars算法题(8)
第26题:问题:问题描述:给定一个列表,和一个整数s,找出列表中两数之和为s,的两个数,并返回,若有若干对这样的数,那么选择相距较短的,在相距较短的中再找出index小的。评分较高答案:def sum_pairs(lst, s): cache = set() for i in lst: if s - i in cache:原创 2017-07-28 08:45:08 · 493 阅读 · 0 评论