码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
Add Digits
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: ...
分类:其他好文   时间:2016-06-15 15:51:38    阅读次数:107
66. Plus One
题目: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit ...
分类:其他好文   时间:2016-06-14 08:51:28    阅读次数:116
[LeetCode] Count Numbers with Unique Digits 计算各位不相同的数字个数
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example: Given n = 2, return 91. (The answer should be the ...
分类:其他好文   时间:2016-06-14 06:25:21    阅读次数:241
【leetcode】357. Count Numbers with Unique Digits
题目描述: Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. 解题分析: 题目要就就是找出 0≤ x < 10n中各位数字都不相同的数的个数。要接触这道题只需要理解: ...
分类:其他好文   时间:2016-06-13 20:38:41    阅读次数:271
1276 - Very Lucky Numbers
1276 - Very Lucky Numbers PDF (English) Statistics Forum Time Limit: 3 second(s) Memory Limit: 32 MB According to some theory 4 and 7 are lucky digits ...
分类:其他好文   时间:2016-06-13 01:18:03    阅读次数:213
【Leetcode】Reverse Integer
题目链接:https://leetcode.com/problems/reverse-integer/ 题目: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 思路: 注意正负情况 算法: [java] vi...
分类:其他好文   时间:2016-06-12 03:26:37    阅读次数:170
【Leetcode】Add Digits
题目链接:https://leetcode.com/problems/add-digits/ 题目: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the p...
分类:其他好文   时间:2016-06-12 02:43:27    阅读次数:135
LeetCode:Sum Root to Leaf Numbers
Sum Root to Leaf Numbers Total Accepted: 78569 Total Submissions: 237646 Difficulty: Medium Given a binary tree containing digits from 0-9 only, each root-to-leaf path coul...
分类:其他好文   时间:2016-06-12 01:56:56    阅读次数:147
7. Reverse Integer
1. 问题描述 Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Have you thought about this? ...
分类:其他好文   时间:2016-06-10 11:05:03    阅读次数:163
[LeetCode129]Sum Root to Leaf Numbers
题目: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3  ...
分类:其他好文   时间:2016-06-09 21:04:44    阅读次数:161
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!