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...
分类:
其他好文 时间:
2015-08-17 13:28:39
阅读次数:
120
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. ...
分类:
其他好文 时间:
2015-08-17 12:11:37
阅读次数:
104
Reverse num/word/bits最近回国了 有点懒Question 1Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Be caref...
分类:
其他好文 时间:
2015-08-17 11:25:12
阅读次数:
148
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-08-17 10:00:19
阅读次数:
111
l leetcode 21_Merge Two Sorted Lists
题目:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes
of the first two lists.
解法:
#includ...
分类:
其他好文 时间:
2015-08-17 01:11:55
阅读次数:
161
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
on...
分类:
其他好文 时间:
2015-08-17 01:06:54
阅读次数:
210
Add DigitsGiven a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is...
分类:
编程语言 时间:
2015-08-17 00:53:13
阅读次数:
138
Well, no matter whether the number is happy or not, its sum-of-squared-digits sequance has a cycle. Well, do you still remember the algorithm for dete...
分类:
移动开发 时间:
2015-08-17 00:51:01
阅读次数:
207
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-08-17 00:50:26
阅读次数:
106
Digital Roots
Problem Description
The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital ...
分类:
其他好文 时间:
2015-08-16 18:22:31
阅读次数:
85