码迷,mamicode.com
首页 >  
搜索关键字:numbers range    ( 16974个结果
projecteuler---->problem=34----Digit factorials
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
projecteuler---->problem=36----Double-base palindromes
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
EnableInputWhenChooseTheLastOption
Select Time Period or Date Range Time Period 30 days 60 days 90 days ...
分类:其他好文   时间:2014-08-24 23:42:43    阅读次数:342
[LeetCode] Combination Sum (bfs)
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
[LeetCode] Combination Sum II (递归)
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
python列表排重:列表排重并计算字符出现的次数
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
Codeforces 460 D. Little Victor and Set
暴力+构造 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
python排序
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
【Leet Code】Add Two Numbers
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
Combinations
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!