1.河内之塔........................................................................................................................................ 4 2.Algorithm Gossip: 费式数列........................................................................................................ 5 3. 巴斯卡三角形.............................................................................................................................. 6 4.Algorithm Gossip: 三色棋............................................................................................................ 7 5.Algorithm Gossip: 老鼠走迷官(一)........................................................................................ 9 6.Algorithm Gossip: 老鼠走迷官(二)...................................................................................... 11 7.Algorithm Gossip: 骑士走棋盘.................................................................................................. 13 8.Algorithm Gossip: 八皇后.......................................................................................................... 16 9.Algorithm Gossip: 八枚银币...................................................................................................... 18 10.Algorithm Gossip: 生命游戏.................................................................................................... 20 11.Algorithm Gossip: 字串核对.................................................................................................... 23 12.Algorithm Gossip: 双色、三色河内塔.................................................................................... 25 13.Algorithm Gossip: 背包问题(Knapsack Problem)............................................................. 29 14.Algorithm Gossip: 蒙地卡罗法求PI...................................................................................... 34 15.Algorithm Gossip: Eratosthenes 筛选求质数............................................................................36 16.Algorithm Gossip: 超长整数运算(大数运算)....................................................................37 17.Algorithm Gossip: 长PI...........................................................................................................39 18.Algorithm Gossip: 最大公因数、最小公倍数、因式分解....................................................43 19.Algorithm Gossip: 完美数........................................................................................................ 46 20.Algorithm Gossip: 阿姆斯壮数................................................................................................ 49 21.Algorithm Gossip: 最大访客数................................................................................................ 50 22.Algorithm Gossip: 中序式转后序式(前序式)....................................................................52 23.Algorithm Gossip: 后序式的运算............................................................................................ 56 24.Algorithm Gossip: 洗扑克牌(乱数排列)............................................................................58 25.Algorithm Gossip: Craps 赌博游戏...........................................................................................60 26.Algorithm Gossip: 约瑟夫问题(Josephus Problem)...........................................................62 27.Algorithm
标签: C语言算法经典
上传时间: 2015-04-30
上传用户:cascas
正整数x 的约数是能整除x 的正整数。正整数x 的约数个数记为div(x)。例如,1,2, 5,10 都是正整数10 的约数,且div(10)=4。设a 和b 是2 个正整数,a≤b,找出a 和b 之间约数个数最多的数x。
上传时间: 2014-11-24
上传用户:gxmm
正整数x 的约数是能整除x 的正整数。正整数x 的约数个数记为div(x)。例如,1,2,5,10 都是正整数10 的约数,且div(10)=4。设a 和b 是2 个正整数,a≤b,找出a 和b之间约数个数最多的数x。 对于给定的2 个正整数a≤b,编程计算a 和b 之间约数个数最多的数。 数据输入 输入数据由文件名为input.txt的文本文件提供。文件的第1 行有2 个正整数a和b。 结果输出 程序运行结束时,若找到的a 和b 之间约数个数最多的数是x,将div(x)输出到文件output.txt中。 输入文件示例 输出文件示例 input.txt output.txt 1 36 9
上传时间: 2016-10-10
上传用户:dianxin61
最小的人体感应模块
上传时间: 2013-05-23
上传用户:eeworm
局域網最常見十大錯誤及解決(一)
标签: 局域
上传时间: 2013-04-15
上传用户:eeworm
最全面的LED知识培训资料
上传时间: 2013-06-06
上传用户:eeworm
一款最大功率150W可实现92%能效的LED路灯电源设计
上传时间: 2013-04-15
上传用户:eeworm
200个聪明人的逻辑思维游戏.最具挑战和智慧的逻辑思维谜题.[陈书凯编著]new
上传时间: 2013-04-15
上传用户:eeworm
家电维修(最基础的教程B)1-20.Torrent
上传时间: 2013-06-10
上传用户:eeworm
最简纯绿画电路图软件IE打开.swf
上传时间: 2013-04-15
上传用户:eeworm