我想知道取的时期是几月、几日,然后做一些统计,上网找了一些方法。--DateTime 数字型
System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒
currentTime=System.DateTime.Now; 1.2 取...
分类:
其他好文 时间:
2014-05-12 15:45:59
阅读次数:
259
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
加群看见的但是计算好慢,谁有更优的算法,麻烦说一下。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
1. 熟知主流硬件体系(x86, x64)2. 熟知 CPython
的具体实现,如若可能至少通读源码三遍以上3. 熟知每条 Python bytecode 如何被解释执行4. 熟知每条 Python 语句如何 compile 成
bytecode5. 熟知 Python 主要数据结构所采用的优化手...
分类:
其他好文 时间:
2014-05-06 00:18:16
阅读次数:
306
引言
LZ之前其实一直对python都很好奇,只是苦于平时没有时间去了解它,因此趁着51假期这个机会,便迫不及待的开始了自己的探索。作为一个标准的Java程序猿,在了解python的过程当中,LZ遇到了很多囧事,接下来LZ就一一给大家说道说道。本文纯属看个乐子,非python教学。囧事一:ecli....
分类:
编程语言 时间:
2014-05-05 23:02:42
阅读次数:
356
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
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