码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
[LeetCode] 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: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one digit, r...
分类:其他好文   时间:2015-11-08 19:29:06    阅读次数:231
[LeetCode]64. Add Digits数根
Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ...
分类:其他好文   时间:2015-11-08 14:30:48    阅读次数:226
HDU - 4333 Revolving Digits(拓展kmp+最小循环节)
1、给一个数字字符串s,可以把它的最后一个字符放到最前面变为另一个数字,直到又变为原来的s。求这个过程中比原来的数字小的、相等的、大的数字各有多少。例如:字符串123,变换过程:123 -> 312 -> 231 -> 123因为:312>123, 231>123, 123=123所以答案是:0 1...
分类:其他好文   时间:2015-11-06 21:03:37    阅读次数:248
Sum Root to Leaf Numbers 解答
QuestionGiven a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3w...
分类:其他好文   时间:2015-11-05 10:27:11    阅读次数:217
2015-11-1-Training(for 2015th)
A:(hdu2081)Solution: get the last five digits, not mod 100000 cause the leading zero.B:(hdu2075)C:(hdu2071)D:(hdu2070)Solution: The 40th fibonacci n.....
分类:其他好文   时间:2015-11-04 10:00:39    阅读次数:203
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 is at...
分类:其他好文   时间:2015-11-02 15:20:30    阅读次数:149
Leetcode 66: Plus One
Question: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 di...
分类:其他好文   时间:2015-11-02 06:42:48    阅读次数:175
Add Digits
题目:Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3...
分类:其他好文   时间:2015-10-31 22:48:10    阅读次数:185
Designing Efficient Algorithms [Examples]~C - Calculator Conundrum
Alice got a hold of an old calculator that can display n digits. She was bored enough to come up with the following time waster.She enters a number k ...
分类:其他好文   时间:2015-10-31 11:30:59    阅读次数:186
[LeetCode]46. Restore IP Addresses复原IP地址
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example: Given "25525511135", return ["2...
分类:其他好文   时间:2015-10-28 22:30:08    阅读次数:232
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!