We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly
once; for example, the 5-digit number, 15234, is 1 through 5 pandigital.
The product 7254 is unusu...
分类:
其他好文 时间:
2015-06-03 11:59:07
阅读次数:
92
Letter Combinations of a Phone Number
题目:
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telepho...
分类:
其他好文 时间:
2015-06-03 11:56:06
阅读次数:
91
145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.
Find the sum of all numbers which are equal to the sum of the factorial of their digits.
Note: as 1! = 1 and 2! = 2 are not sums they...
分类:
其他好文 时间:
2015-06-03 11:54:13
阅读次数:
103
Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:
1634 = 14 + 64 + 34 + 44
8208 = 84 + 24 + 04 + 84
9474 = 94 + 44 + 74 + 44
As 1 = 14 ...
分类:
其他好文 时间:
2015-06-03 10:01:49
阅读次数:
106
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn?1 + Fn?2, 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
F7 = 1...
分类:
其他好文 时间:
2015-06-02 00:33:24
阅读次数:
168
Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10724Accepted: 3980DescriptionChildren are taught to add multi-digit numbers from right-to-le...
分类:
其他好文 时间:
2015-06-01 09:27:36
阅读次数:
105
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 digi...
分类:
其他好文 时间:
2015-05-31 15:22:58
阅读次数:
131
215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
What is the sum of the digits of the number 21000?
#include
#include
using namespace std;
int main()
{
string s = "1";
for (...
分类:
其他好文 时间:
2015-05-31 11:01:20
阅读次数:
133
Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.
37107287533902102798797998220837590246510135740250
46376937677490009712648124896970078050417018260538
7432498...
分类:
其他好文 时间:
2015-05-30 21:11:50
阅读次数:
130
Problem Description
Given a positive integer N, you should output the most right digit of N^N.
Input
The input contains several test cases. The first line of the input is a single integer T...
分类:
Web程序 时间:
2015-05-30 18:19:19
阅读次数:
128