刚刚学习python的菜鸟,这道题包括:文件的读写,python的参数调用,异常的使用,函数的使用 创建一个文本文件inti_prime.txt 执行命令:python Prime.py init_prime.txt result_prime.txt 会生成一个result_prime.txt文件 ...
分类:
编程语言 时间:
2016-12-04 23:32:39
阅读次数:
538
参考这篇文章,讲得很好:http://www.blogjava.net/yxhxj2006/archive/2012/10/15/389547.html 来自:http://www.ruanyifeng.com/blog/2011/08/what_is_a_digital_signature.htm ...
分类:
其他好文 时间:
2016-12-04 14:11:06
阅读次数:
865
Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes ...
分类:
其他好文 时间:
2016-12-02 14:12:22
阅读次数:
167
传送门 Description A ring is composed of n (even number) circles as shown in diagram. Put natural numbers 1, 2, . . . , n into each circle separately, an ...
分类:
其他好文 时间:
2016-12-01 02:31:23
阅读次数:
214
一、最短路问题和最小生成树。 带权图分为有向和无向,无向图的最短路径又叫做最小生成树,有prime算法和kruskal算法;有向图的最短路径算法有dijkstra算法和floyd算法。 生成树的概念:联通图G的一个子图如果是一棵包含G的所有顶点的树,则该子图称为G的生成树 生成树是联通图的极小连通子 ...
分类:
其他好文 时间:
2016-11-30 19:56:49
阅读次数:
224
https://en.wikipedia.org/wiki/Euler's_totient_function counts the positive integers up to a given integer n that are relatively prime to n. if two num ...
分类:
其他好文 时间:
2016-11-30 03:18:14
阅读次数:
154
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 23931 Accepted: 13044 Description Some positive integers c ...
分类:
其他好文 时间:
2016-11-29 06:22:07
阅读次数:
182
For a given set of K prime numbers S = {p1, p2, ..., pK}, consider the set of all numbers whose prime factors are a subset of S. This set contains, fo ...
分类:
其他好文 时间:
2016-11-27 16:54:50
阅读次数:
248
Brute Force算法,时间复杂度 O(mn) Rabin karp算法时间复杂度可以降低到 O(mn) on average. haystack: abcdefgh, needle: abc needle_code = a + b*p + c*p^2 使用sliding window计算hay ...
分类:
其他好文 时间:
2016-11-27 09:55:30
阅读次数:
181
[POJ2109]Power of Cryptography 试题描述 Current work in cryptography involves (among other things) large prime numbers and computing powers of numbers amo ...
分类:
其他好文 时间:
2016-11-26 11:47:03
阅读次数:
249