Problem 34
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...
分类:
其他好文 时间:
2014-08-25 11:59:14
阅读次数:
243
Problem 36
The decimal number, 585 = 10010010012 (binary), is palindromic in both bases.
Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.
(Please...
分类:
其他好文 时间:
2014-08-25 10:06:04
阅读次数:
198
Select Time Period or Date Range Time Period 30 days 60 days 90 days ...
分类:
其他好文 时间:
2014-08-24 23:42:43
阅读次数:
342
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeate...
分类:
其他好文 时间:
2014-08-24 23:34:33
阅读次数:
259
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each numb...
分类:
其他好文 时间:
2014-08-24 23:29:33
阅读次数:
176
a=[1,2,2,3,4,5,6,8,9,0,0,0]dictc={}for i in range(len(a)): dictc[a[i]]=a.count(a[i])for key in dictc: print key,dictc[key]这段代码主要关注两点:1、字典的key是唯一...
分类:
编程语言 时间:
2014-08-24 16:41:02
阅读次数:
179
暴力+构造
If r?-?l?≤?4 we can all subsets of size not greater than k.
Else, if k?=?1, obviously that answer is l. If k?=?2,
answer is 1, because xor of numbers 2x and 2x?+?1 equls 1.
If k?≥...
分类:
其他好文 时间:
2014-08-24 11:40:22
阅读次数:
233
import mathclass sort: def selectSort(self, L): size = len(L) for i in range(0, size): max = L[i] index = i ...
分类:
编程语言 时间:
2014-08-23 22:48:11
阅读次数:
205
Add Two Numbers
Total Accepted: 20255 Total
Submissions: 88115My Submissions
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order a...
分类:
其他好文 时间:
2014-08-23 21:40:01
阅读次数:
200
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If n = 4 and k = 2, a solution is:[ [2,4], [3,4.....
分类:
其他好文 时间:
2014-08-23 21:37:41
阅读次数:
199