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
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
1、给一个数字字符串s,可以把它的最后一个字符放到最前面变为另一个数字,直到又变为原来的s。求这个过程中比原来的数字小的、相等的、大的数字各有多少。例如:字符串123,变换过程:123 -> 312 -> 231 -> 123因为:312>123, 231>123, 123=123所以答案是:0 1...
分类:
其他好文 时间:
2015-11-06 21:03:37
阅读次数:
248
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
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
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
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
题目: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
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
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