码迷,mamicode.com
首页 >  
搜索关键字:python time datetime unixtimestamp    ( 187406个结果
C# 常用日期函数
我想知道取的时期是几月、几日,然后做一些统计,上网找了一些方法。--DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取...
分类:其他好文   时间:2014-05-12 15:45:59    阅读次数:259
[leetcode] Best Time to Buy and Sell Stock II
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:其他好文   时间:2014-05-06 00:51:29    阅读次数:353
python 求10亿以内和987654互质正整数的和
加群看见的但是计算好慢,谁有更优的算法,麻烦说一下。factor=[]for x in xrange(1, 987654//2+1): if 987654%x==0: factor.append(x)sum=0for y in xrange(1, 1000000000): ...
分类:编程语言   时间:2014-05-06 00:37:50    阅读次数:851
名字空间和异常
那年是787年!公元?——Monty Python任何规则都不可能如此一般,以至不能容许任何例外(异常)。——Bobert Burton1、模块化和界面 任何实际程序都是由一些部分组成的。例如,最简单的“ Hello, world! ”程序也涉及到至少两部分:用户代码要求将Hello, world....
分类:其他好文   时间:2014-05-06 00:19:04    阅读次数:382
精通phthon的条件
1. 熟知主流硬件体系(x86, x64)2. 熟知 CPython 的具体实现,如若可能至少通读源码三遍以上3. 熟知每条 Python bytecode 如何被解释执行4. 熟知每条 Python 语句如何 compile 成 bytecode5. 熟知 Python 主要数据结构所采用的优化手...
分类:其他好文   时间:2014-05-06 00:18:16    阅读次数:306
人在囧途——Java程序猿学习Python
引言 LZ之前其实一直对python都很好奇,只是苦于平时没有时间去了解它,因此趁着51假期这个机会,便迫不及待的开始了自己的探索。作为一个标准的Java程序猿,在了解python的过程当中,LZ遇到了很多囧事,接下来LZ就一一给大家说道说道。本文纯属看个乐子,非python教学。囧事一:ecli....
分类:编程语言   时间:2014-05-05 23:02:42    阅读次数:356
【LeetCode OJ】Longest Consecutive Sequence
Problem Link:http://oj.leetcode.com/problems/longest-consecutive-sequence/This problem is a classical problem where we can reduce the running time by ...
分类:其他好文   时间:2014-05-05 22:55:22    阅读次数:552
Reverse Nodes in k-Group
Link:http://oj.leetcode.com/problems/reverse-nodes-in-k-group/Given a linked list, reverse the nodes of a linked listkat a time and return its modifie...
分类:其他好文   时间:2014-05-05 22:46:42    阅读次数:456
拼图
拼图Time Limit:1000MSMemory Limit:65535KBSubmissions:117Accepted:69Description给你1x2、2x1和2x2,3种矩形若干,请你计算出把它们放入2xn的矩形中,一共有多少方法?Input输入有多组测试数据没行输入一个整数n , 3...
分类:其他好文   时间:2014-05-05 22:35:15    阅读次数:435
挑战题之排列生成
挑战题之排列生成Time Limit:2000MSMemory Limit:65535KBSubmissions:435Accepted:170Description一自然数N,设N为3,则关于N的字典序排列为123,132,213,231,312,321。对于一个自然数N(1#include us...
分类:其他好文   时间:2014-05-05 22:25:33    阅读次数:294
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!