quark

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2012年6月26日

摘要: Problem Description By replacing the 1st digit of *3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime. By replacing the 3rd and 4th digits of 56**3 with t... 阅读全文
posted @ 2012-06-26 17:13 QuarkZ 阅读(364) 评论(0) 推荐(0) 编辑

摘要: Problem Description In the card game poker, a hand consists of five cards and are ranked, from lowest to highest, in the following way: High Card: Highest value card. One Pair: Two cards of the same... 阅读全文
posted @ 2012-06-26 11:59 QuarkZ 阅读(227) 评论(0) 推荐(0) 编辑

2012年6月21日

摘要: Problem DescriptionThere are exactly ten ways of selecting three from five, 12345:123, 124, 125, 134, 135, 145, 234, 235, 245, and 345In combinatorics, we use the notation, 5C3= 10.In general,nCr =n!r!(n-r)!,where r<=n, n! = n*(n-1)…*3*2*1, and 0! = 1.It is not until n = 23, that a value exceeds 阅读全文
posted @ 2012-06-21 12:18 QuarkZ 阅读(149) 评论(0) 推荐(0) 编辑

摘要: Problem Description It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order. Find the smallest positive integer, x, such that 2x, 3x, ... 阅读全文
posted @ 2012-06-21 10:56 QuarkZ 阅读(169) 评论(0) 推荐(0) 编辑

2012年6月20日

摘要: Problem Description The prime 41, can be written as the sum of six consecutive primes: 41 = 2 + 3 + 5 + 7 + 11 + 13 This is the longest sum of consecutive primes that adds to a prime below one-hundred... 阅读全文
posted @ 2012-06-20 11:04 QuarkZ 阅读(289) 评论(0) 推荐(0) 编辑

2012年6月19日

摘要: Problem DescriptionThe arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another.There are no arithmetic sequences made up of three 1-, 2-, 阅读全文
posted @ 2012-06-19 17:10 QuarkZ 阅读(316) 评论(0) 推荐(0) 编辑

2012年5月25日

摘要: Problem Description The series, 11 + 22 + 33 + ... + 1010 = 10405071317. Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000. Python This problem is so easy to python, because pyt... 阅读全文
posted @ 2012-05-25 13:56 QuarkZ 阅读(382) 评论(0) 推荐(0) 编辑

2012年4月5日

摘要: find命令相对于grep命令要复杂一些。通过几个比较典型的find用法来学习find命令find . -type f -exec ls -l {} \;从当前文件夹中查找普通文件,并且对每个匹配的文件执行“ls -l {}”操作;-type表示按照文件类型来查找文件:b - 块设备文件。d - 目录。c - 字符设备文件。p - 管道文件。l - 符号链接文件。f - 普通文件。find logs -type f -mtime +5 -exec rm {} \;从logs文件夹中查找最后修改日期在5天前的文件,并且删除它们;-mtime:Modify Time-atime: Access T 阅读全文
posted @ 2012-04-05 22:06 QuarkZ 阅读(15608) 评论(0) 推荐(2) 编辑

摘要: 格式:grep [ -E | -F ] [ -i ] [ -h ] [ -s ] [ -v ] [ -w ] [ -x ] [ -y ] [ [ [ -b ] [ -n ] ] | [ -c | -l | -q ] ] [ -p [ Separator ] ] { [ -e PatternList 阅读全文
posted @ 2012-04-05 18:59 QuarkZ 阅读(5450) 评论(0) 推荐(1) 编辑

2012年3月20日

摘要: 先贴出自己写的测试代码:int* M2(int* p){ return p+1;}int M(int a, char b){ int* pp = M2(&a); return *pp;}int _tmain(int argc, _TCHAR* argv[]){ int e=0; int d = M(3,'c'); getchar(); return 0;}然后来一层一层的分析:调用函数Main008B1030 push ebp // 将ebp的值压入栈 008B1031 mov ebp,esp // 将esp的值赋值给ebp008B1033 sub ... 阅读全文
posted @ 2012-03-20 10:34 QuarkZ 阅读(6025) 评论(0) 推荐(1) 编辑