
Math
slbyzdgz
这个作者很懒,什么都没留下…
展开
-
LeetCode--Power of Three、Integer Break、Count Numbers with Unique Digits、Valid Perfect Square
326.Power of Three Given an integer, write a function to determine if it is a power of three. 给定一个整数,写一个函数来判断它是否是 3的幂次方。 class Solution(object): def isPowerOfThree(self, n): """ ...原创 2019-07-30 20:58:37 · 168 阅读 · 0 评论 -
LeetCode--Add Binary、Sqrt(x)、Excel Sheet Column Title、Excel Sheet Column Number、Factorial Trailing Z
67.Add Binary Given two binary strings, return their sum (also a binary string). The input strings are bothnon-emptyand contains only characters1or0. Example 1: Input: a = "11", b = "1" Out...原创 2019-07-27 20:09:47 · 125 阅读 · 0 评论 -
LeetCode--Happy Number、Power of Two、 Add Digits、Ugly Number
202.Happy Number Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the s...原创 2019-07-27 21:14:45 · 208 阅读 · 0 评论 -
LeetCode--Arranging Coins
441.Arranging Coins You have a total ofncoins that you want to form in a staircase shape, where everyk-th row must have exactlykcoins. Givenn, find the total number offullstaircase rows tha...原创 2019-08-01 20:26:52 · 141 阅读 · 0 评论 -
LeetCode---Rectangle Area、Reconstruct Original Digits from English、Valid Square、Sum of Square Number
223.Rectangle Area Find the total area covered by tworectilinearrectangles in a2Dplane. Each rectangle is defined by its bottom left corner and top right corner as shown in the figure. Examp...原创 2019-08-06 22:23:31 · 153 阅读 · 0 评论 -
LeetCode---Binary Gap、Self Dividing Numbers、Reach a Number、Rectangle Overlap
868.Binary Gap Given a positiveintegerN, find and return the longest distance between two consecutive 1's in the binary representation ofN. If there aren't two consecutive 1's, return0. Exampl...原创 2019-08-07 19:58:04 · 177 阅读 · 0 评论