摘要:
Golden PyramidOur Robo-Trio need to train for future journeys and treasure hunts. Stephan has built a special flat model of a pyramid. Now the robots ... 阅读全文
摘要:
Prime Palindrome GolfDo you know how to play Prime Palindrome Golf? You are given a number and your challenge is to find the closest palindromic prime... 阅读全文
摘要:
Min and Max需要处理不同数据类型; 另外*args, 表示的是位置参数, *kwargs表示的是key参数, args的类型为tuple类型, 参数为min(3, 2)时, args为(3, 2), 参数为min([3, 2])时, args为([3, 2], );列表解析为[i for ... 阅读全文
摘要:
Roman numerals罗马数字的题目, 注意几个关键的数字即可: (100, 400, 500, 900) -> ('C', 'CD', 'D', 'CM'); (10, 40, 50, 90)->('X', 'XL', 'L', 'XC') 1 def checkio(data): 2 ... 阅读全文
摘要:
How to find friends思路简单,编码不易 1 def check_connection(network, first, second): 2 link_dictionary = dict() 3 4 for link in network: 5 dr... 阅读全文
摘要:
Pawn Brotherhood 1 alpha_table = "abcdefgh" 2 3 def safe_pawns(pawns): 4 safe_count = 0 5 6 for spawn in pawns: 7 if spawn[1] == '1'... 阅读全文
摘要:
The Flat Dictionary原来的代码没处理dict为空的情况 1 def flatten(dictionary): 2 #[] is a list 3 #() is a tuple 4 stack = [((), dictionary)] 5 6 res... 阅读全文
摘要:
Speech Module 1 FIRST_TEN = ["one", "two", "three", "four", "five", "six", "seven", 2 "eight", "nine"] 3 SECOND_TEN = ["ten", "eleven", "... 阅读全文
摘要:
Xs and Os Referee 1 def checkio(game_result): 2 winner = 'D' 3 4 for row in game_result: 5 if row[0] == row[1] == row[2] and row[0] !... 阅读全文
摘要:
The Most Wanted LetterYou are given a text, which contains different english letters and punctuation symbols. You should find the most frequent letter... 阅读全文