美妙的Python之Python起步 简而言之: Python 是能你无限惊喜的语言,与众不同。...
分类:
编程语言 时间:
2014-06-03 00:36:33
阅读次数:
262
之前看到geventhttpclient这个项目,https://github.com/gwik/geventhttpclient,官方文档说非常快,由于响应使用了C的解析,所以我一直想把这玩意用到项目中,这两天一直在纠结这玩意,说实在一句话,比较难用,封装的不给力,最大缺陷如下:1.不支持重定向,重定向需要自己来写,很费事2.新建的httpclient对象只能发送同域名的请求这相当的蛋疼,我花了...
分类:
编程语言 时间:
2014-06-02 23:24:05
阅读次数:
485
python开发环境设置(windows)
1) python2.7.3安装
在www.python.org上下载python-2.7.6.amd64.msi软件,安装完成后设置path路径。控制面板->高级系统设置->高级->环境变量->新建用户变量,输入变量名path,变量值,确定,确定。
查看设置是否成功:cmd->python,有如下图输出,说明环境变量设置成功...
分类:
编程语言 时间:
2014-06-02 22:41:26
阅读次数:
401
title:
The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:
1, 3, 6, 10,...
分类:
其他好文 时间:
2014-06-01 10:31:26
阅读次数:
233
In the 2020 grid below, four numbers along a diagonal line have been marked in red.
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 ...
分类:
其他好文 时间:
2014-06-01 10:04:38
阅读次数:
419
昨晚早早跪了,身体太累了,根本吃不消CF了,早上起来继续刷一题!Then,写写python,shell,基本又一天。
题目还是中文题~!
思路:一开始看起来这题目有dfs,但这个矩阵貌似太大了,dfs不敢碰,还是老老实实dp吧,我的做法是,先刷掉最第一列,因为第一列只能从左上往下,then,第i行第j列应该就是dp[i][j]=max(dp[i-1][j],dp[i][k] )+dp[i]...
分类:
其他好文 时间:
2014-06-01 09:49:34
阅读次数:
238
title:
A Pythagorean triplet is a set of three natural numbers, a
b
c, for which,
a2 + b2 =
c2
For example, 32 + 42 = 9 + 16 = 25 = 52.
There exists exactly one Pythagorean triplet for wh...
分类:
其他好文 时间:
2014-06-01 09:17:53
阅读次数:
251
title:
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below two million.
翻译:
10以下的质数的和为2 + 3 + 5 + 7 = 17。
请求出200,0000以下所有质数的和。
import math,time
d...
分类:
其他好文 时间:
2014-06-01 09:12:31
阅读次数:
239