n! means n (n
1)
...
3
2
1
For example, 10! = 10 9
...
3
2
1 = 3628800,
and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.
Find the sum of the digits...
分类:
其他好文 时间:
2014-06-20 09:34:10
阅读次数:
215
class Solution {private: const static char*
pattern[]; const static char* roman_digit[];public: string intToRoman(int num) {
if (num ...
分类:
其他好文 时间:
2014-06-16 07:04:22
阅读次数:
171
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 the head of the list.
思路:原有数组需要多出一位的唯一条件是数组所...
分类:
其他好文 时间:
2014-06-15 18:42:43
阅读次数:
162
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two...
分类:
其他好文 时间:
2014-06-11 00:35:15
阅读次数:
243
原题地址:https://oj.leetcode.com/problems/letter-combinations-of-a-phone-number/题意:Given
a digit string, return all possible letter combinations that the ...
分类:
编程语言 时间:
2014-06-10 16:40:57
阅读次数:
223
Two players, S and T, are playing a game where they make alternate moves. S plays
first.
In this game, they start with an integer N. In each move, a player removes one digit from the integer and p...
分类:
其他好文 时间:
2014-06-10 06:31:29
阅读次数:
302
题目
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 the head of the list.
方法
...
分类:
其他好文 时间:
2014-06-10 06:12:06
阅读次数:
285
问题描述:
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn1 + Fn2,
where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
...
分类:
其他好文 时间:
2014-06-10 06:10:06
阅读次数:
307
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:
其他好文 时间:
2014-06-08 15:30:28
阅读次数:
227
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...
分类:
其他好文 时间:
2014-06-07 16:56:28
阅读次数:
188