08 2018 档案

摘要:278. First Bad Version# The isBadVersion API is already defined for you.# @param version, an integer# @return a bool# def isBadVersion(version):class 阅读全文
posted @ 2018-08-30 04:53 ffeng0312 阅读(127) 评论(0) 推荐(0)
摘要:class Solution(object): def canWinNim(self, n): """ :type n: int :rtype: bool """ if n%4==0: return False else: return True 阅读全文
posted @ 2018-08-18 05:32 ffeng0312 阅读(108) 评论(0) 推荐(0)
摘要:class Solution(object): def intersection(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: List[int] """ return list(set( 阅读全文
posted @ 2018-08-15 02:26 ffeng0312 阅读(127) 评论(1) 推荐(0)
摘要:class Solution(object): def addDigits(self, num): """ :type num: int :rtype: int """ sum=num%10 a=num/10 if a >=1: while a > 9: sum += a%10 a=a/10 sum 阅读全文
posted @ 2018-08-14 00:15 ffeng0312 阅读(113) 评论(0) 推荐(0)
摘要:class Solution(object): def findLUSlength(self, a, b): """ :type a: str :type b: str :rtype: int """ if len(a) == len(b): if a <> b: return len(a) els 阅读全文
posted @ 2018-08-01 06:44 ffeng0312 阅读(83) 评论(0) 推荐(0)