Problem 32
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 produ...
分类:
其他好文 时间:
2014-08-22 16:23:19
阅读次数:
178
Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about th...
分类:
其他好文 时间:
2014-08-21 19:07:04
阅读次数:
142
Problem 30
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...
分类:
其他好文 时间:
2014-08-21 09:48:04
阅读次数:
251
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som...
分类:
其他好文 时间:
2014-08-19 23:54:05
阅读次数:
245
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given "25525511135",return ["255...
分类:
其他好文 时间:
2014-08-19 20:40:45
阅读次数:
203
Digital RootsTime Limit: 1000ms Memory limit: 65536K有疑问?点这里^_^题目描述The digital root of a positive integer is found by summing the digits of the integer...
分类:
其他好文 时间:
2014-08-18 22:00:43
阅读次数:
228
题目如下:
215 = 32768 并且其各位之和为 is 3 + 2 + 7 + 6 + 8 = 26.
21000 的各位数之和是多少?
原题如下:
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 210...
分类:
编程语言 时间:
2014-08-18 16:28:02
阅读次数:
272
题目:给你一个整数n,求一个数m,使得m的每个位数的乘积是n,求最小的m。
分析:贪心。直接从9到2枚举所有的因数,统计即可。如果还有大于9的素数这输出-1。
说明:今天Timus发邮件,说我的这个题目,在那边的解错了╮(╯▽╰)╭。
#include
#include
#include
using namespace std;
int save[10];
int main()...
分类:
其他好文 时间:
2014-08-18 14:36:42
阅读次数:
266
Problem C CALCULATOR CONUNDRUMAlice got a hold of an old calculator that can display n digits. She was bored enough to come up with the following time...
分类:
其他好文 时间:
2014-08-18 12:07:54
阅读次数:
269
Given a string containing only digits, restore it by returning all possible valid IP address combinations....
分类:
其他好文 时间:
2014-08-17 22:48:32
阅读次数:
217