如下所示 给出2个解法
def euler_problem_18_1():
"""
this problem spend my half-day but noting to finished ,so bad
"""
rows = '''
3
7 4
2 4 6
100 5 9 3
'''
...
分类:
编程语言 时间:
2014-06-07 01:28:18
阅读次数:
261
title:
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is
evenly divisible by all of the nu...
分类:
其他好文 时间:
2014-06-07 01:27:37
阅读次数:
229
stooge排序是一种递归排序算法,这种排序算法不仅慢于一般的有效排序算法(如:插入排序,合并排序,堆排序和快速排序),甚至慢于冒泡排序。是一种简单但低效的排序算法。...
分类:
其他好文 时间:
2014-06-07 01:26:17
阅读次数:
173
title:
Largest palindrome product
Problem 4
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91
99.
Find the l...
分类:
其他好文 时间:
2014-06-07 01:24:27
阅读次数:
398
给定一个无向图,求s到t间的一条路径,使得该路径上最大边和最小边的比值最小
将边按边权大小排序后,直接枚举枚举一个区间[ i , j ] (1
#include
#include
#include
#include
#define N 100000
#define INF 50000
using namespace std;
int f[N], n, m, i, j, k, ...
分类:
其他好文 时间:
2014-06-05 12:44:15
阅读次数:
230
title:
The sum of the squares of the first ten natural numbers is,
12 + 22 + ... + 102 = 385
The square of the sum of the first ten natural numbers is,
(1 + 2 + ... + 10)2 = 552 = 3025
Hence ...
分类:
其他好文 时间:
2014-06-05 12:03:29
阅读次数:
243
python try except else finally 执行顺序详细分析...
分类:
编程语言 时间:
2014-06-05 11:43:56
阅读次数:
305
总结下python中线程调度机制.
对于线程调度机制而言,同操作系统的进程调度一样,最关键是要解决两个问题:
1.在何时选择挂起当前线程,并选择处于等待的先一个线程呢?
2.在众多等待的线程中,选择哪一个作为激活线程呢?
在python多线程机制中,这个两个问题是有两个层次解决的。
如,进程间的切换,当发生了时钟中断,操作系统响应时钟中断,并在这个时候开始进程的调...
分类:
编程语言 时间:
2014-06-05 10:07:35
阅读次数:
314
HashMap sMap = new HashMap();
sMap.put("张三", 90L);
sMap.put("李四", 79L);
sMap.put("王五", 88L);
sMap.put("赵六", 76L);
ArrayList> list = new ArrayList>(sMap.entrySet());
Collections...
分类:
其他好文 时间:
2014-06-05 07:02:28
阅读次数:
211
有个好网站http://www.lfd.uci.edu/~gohlke/pythonlibs/ , 这个网站可以下载许多非官方的python库的安装包。
1.首先去这个网站下载cx_freeze安装包后安装。
2.在C:\PythonXX\Scripts\ 下可以看到cxfreeze-quickstart.bat, XX为版本号
3.运行cxfreeze-quickstart.bat...
分类:
编程语言 时间:
2014-06-05 06:24:55
阅读次数:
350