码迷,mamicode.com
首页 >  
搜索关键字:python objects all    ( 160304个结果)
Eulerproblem-12 for python
def ext12():     """         三角形数序列是由对自然数的连加构造成的。所以第七个三角形数是1 + 2 + 3 + 4 + 5 + 6 + 7 = 28 。那么三角形数序列中的         前十个是:             1, 3, 6, 10, 15, 21, 28, 36, 45, 55 。。。         下面是我们列出来的前7个三角形数的约数...
分类:编程语言   时间:2014-05-26 05:58:32    阅读次数:216
Eulerproblem-13 for python
def ext14():     """     """     grid = '''37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260538 7432498619952474105947423330951305812372661730...
分类:编程语言   时间:2014-05-26 05:52:04    阅读次数:183
[Python]linux自定义Python脚本命令
在window下写好的程序配置到Linux上,要实现任意目录下的命令调用。 由于初学Linux,这里从文件传输等最基本的方法入手,记录配置的过程中遇到的各种问题。...
分类:编程语言   时间:2014-05-26 04:39:10    阅读次数:345
ADO与ADO.Net
在介绍ADO.Net之前先让我们回顾一下在红皮书中学习的ADO的内容。      ADO(ActiveX Data Objects),我们称它为一种用于数据访问的对象模型,《VB.Net》视频中称它为用于存取资料库的物件集合。资料库就是数据,物件即对象。这样看来两种说法完全一样。提起ADO,我们只要问自己两个问题: 它是什么?  ——对象的集合干什么用的?——访问数据     这...
分类:Web程序   时间:2014-05-26 04:08:59    阅读次数:327
2014辽宁省赛 Repeat Number
问题 C: Repeat Number 时间限制: 1 Sec  内存限制: 128 MB 提交: 23  解决: 7 [提交][状态][论坛] 题目描述 Definition: a+b = c, if all the digits of c are same ( c is more than ten),then we call a and b are Repeat Number. My...
分类:其他好文   时间:2014-05-26 04:03:34    阅读次数:228
LeetCode:3Sum
题目:         Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique  triplets in the array which gives the sum of zero. Note: Elements...
分类:其他好文   时间:2014-05-25 00:39:37    阅读次数:343
01背包问题(回溯法)python实现
接上一篇,同样的01背包问题,上一篇采用动态规划的方法,现在用回溯法解决。回溯法采用深度优先策略搜索问题的解,不多说,代码如下: bestV=0 curW=0 curV=0 bestx=None def backtrack(i): global bestV,curW,curV,x,bestx if i>=n: if bestV<curV: bestV=curV bestx=...
分类:编程语言   时间:2014-05-24 22:08:01    阅读次数:544
python socket-framework 1
SocketServer TCPServer,UDPServer,UnixStreamServer,UnixDatagramServer...
分类:编程语言   时间:2014-05-24 22:03:54    阅读次数:424
LeetCode: Anagrams [048]
【题目】 Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case. For example: Input:  ["tea","and","ate","eat","den"] Output: ["tea","ate","eat"] 【题意】 anagrams指的是颠倒字母顺序构成的单词,以tea为例,则与它an...
分类:其他好文   时间:2014-05-24 18:36:01    阅读次数:317
LeetCode——Palindrome Partition
Palindrome Partitioning   Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "...
分类:其他好文   时间:2014-05-24 14:29:45    阅读次数:222
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!