![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学
LUCASYAN个
这个作者很懒,什么都没留下…
展开
-
507. Perfect Number 数学 一个数是其所有因数之和
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 a function that returns true when it is a perf原创 2017-09-14 19:15:17 · 397 阅读 · 0 评论 -
453. Minimum Moves to Equal Array Elements 数学公式推导
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 - 1 elements by 1. Example: Input: [1,2,3] Ou原创 2017-09-14 20:58:40 · 170 阅读 · 0 评论 -
633. Sum of Square Numbers 平方数之和 看一个数是否能够有两个平方数组成
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 Explanation: 1 * 1 + 2 * 2 = 5 Exam原创 2017-09-14 21:16:15 · 1154 阅读 · 0 评论 -
462. Minimum Moves to Equal Array Elements II
Given a non-empty integer array, find the minimum number of moves required to make all array elements equal, where a move is incrementing a selected element by 1 or decrementing a selected element b原创 2017-09-14 21:18:20 · 131 阅读 · 0 评论 -
553. Optimal Division 数学、字符串
Given a list of positive integers, the adjacent integers will perform the float division. For example, [2,3,4] -> 2 / 3 / 4. However, you can add any number of parenthesis at any position to change原创 2017-09-14 22:16:37 · 186 阅读 · 0 评论 -
343. Integer Break
Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get. For example, given n = 2, ret原创 2017-09-12 21:17:32 · 131 阅读 · 0 评论 -
357. Count Numbers with Unique Digits 数学 找规律
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x n. Example: Given n = 2, return 91. (The answer should be the total numbers in the range of 0 ≤ x [11,22,33,44,55原创 2017-09-12 21:33:22 · 314 阅读 · 0 评论