02 2018 档案

摘要:A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0, 128 阅读全文
posted @ 2018-02-17 08:34 Jimmy_Cheng 阅读(467) 评论(0) 推荐(0)
摘要:Given a non-negative integer c, your task is to decide whether there're two integers a and b such that a2 + b2 = c. Example 1: Input: 5 Output: True E 阅读全文
posted @ 2018-02-15 07:48 Jimmy_Cheng 阅读(257) 评论(0) 推荐(0)
摘要:We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write 阅读全文
posted @ 2018-02-11 10:32 Jimmy_Cheng 阅读(178) 评论(0) 推荐(0)
摘要:Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n  阅读全文
posted @ 2018-02-10 12:43 Jimmy_Cheng 阅读(160) 评论(0) 推荐(0)
摘要:You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. Given n, find the total number 阅读全文
posted @ 2018-02-09 11:35 Jimmy_Cheng 阅读(237) 评论(0) 推荐(0)
摘要:Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100 阅读全文
posted @ 2018-02-07 06:34 Jimmy_Cheng 阅读(168) 评论(0) 推荐(0)
摘要:Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... Note:n is positive and will fit within the range of a 32-bi 阅读全文
posted @ 2018-02-06 08:55 Jimmy_Cheng 阅读(164) 评论(0) 推荐(0)
摘要:Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library functio 阅读全文
posted @ 2018-02-03 06:22 Jimmy_Cheng 阅读(174) 评论(0) 推荐(0)
摘要:Given an integer, write a function to determine if it is a power of three. Follow up:Could you do it without using any loop / recursion? 题目标签:Math 题目要 阅读全文
posted @ 2018-02-03 05:46 Jimmy_Cheng 阅读(222) 评论(0) 推荐(0)
摘要:Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For exa 阅读全文
posted @ 2018-02-02 05:56 Jimmy_Cheng 阅读(156) 评论(0) 推荐(0)