码迷,mamicode.com
首页 >  
搜索关键字:python 练习题    ( 137634个结果
数据结构中常见的排序算法
常见排序算法的基本思想及Python源代码。
分类:其他好文   时间:2014-06-02 20:12:01    阅读次数:255
Rhythmbox中文乱码
今天在网络上找到了一个比较好的解决Rhythmbox中文乱码的问题的方法 进入你的音乐文件夹执行如下代码: mid3iconv -e GBK *.mp3 如果没有提示多试几次, 有可能系统会提示: python-mutagen没有安装。 sudo apt-get install python-mut...
分类:其他好文   时间:2014-06-02 17:28:14    阅读次数:251
python 中 struct 用法
下面就介绍这个模块中的几个方法。 struct.pack():我的理解是,python利用 struct模块将字符(比如说 int,long ,unsized int 等)拆成 字节流(用十六进制表示),便于传输。 其函数原型为:struct.pack(fmt, v1, v2, ...),fmt表示...
分类:编程语言   时间:2014-06-02 17:13:12    阅读次数:253
projecteuler---->problem=11----Largest product in a grid
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
HDU2571
昨晚早早跪了,身体太累了,根本吃不消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
projecteuler---->problem=9----Special Pythagorean triplet
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
projecteuler---->problem=10----Summation of primes
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
projecteuler---->problem=13----Large sum
title: Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. 37107287533902102798797998220837590246510135740250 4637693767749000971264812489697007805041701826053...
分类:其他好文   时间:2014-06-01 08:53:33    阅读次数:276
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!