文件名称:guess_number
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
haskell实现的经典的猜数字游戏,猜一个四位数字,每猜一次数字返回A*B*表示猜中的数字和位置猜中的数字,本算法保证不超过8次,且不利用任何的筛选机制(意味着内存消耗几乎为0),经本机测试,猜出0123到9876(四位数字不相同),naive算法的时间最快为10到20分钟,此算法采用数学计算,只需0.5秒,恩,函数式语言设计,恩,就是你想找的。-haskell achieve classic guessing game, guess a four-digit number, each digit returns guess one A* B* denote digit number and location guessed guessed, this algorithm ensures that no more than 8 times, and do not use any of the screening mechanism (meaning the memory consumption is almost zero), tested by this machine, guess 0123-9876 (four numbers are not the same), naive algorithm is the fastest time for 10-20 minutes, this algorithm uses mathematical calculations, only 0.5 sec, uh, functional language design, uh, what you are looking for.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Main.hs
GuessGame.hs