大数阶乘,能计算超大数的阶乘,算法简单易懂,采用数组存储计算结果!本算法也可以改进采用链表存储结果!
标签:
上传时间: 2015-03-15
上传用户:ouyangtongze
此代码是用c语言编写的决策树的c4.5代码,它是数据挖掘分类算法中的一种,可以对给定数据集进行分类,挖掘出规则
上传时间: 2013-12-15
上传用户:sz_hjbf
数字运算,判断一个数是否接近素数 A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value. Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not. Input Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone. Output For each case, print "yes" on a line if the given number is a Niven number, and "no" otherwise. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no
上传时间: 2015-05-21
上传用户:daguda
c语言版的多项式曲线拟合。 用最小二乘法进行曲线拟合. 用p-1 次多项式进行拟合,p<= 10 x,y 的第0个域x[0],y[0],没有用,有效数据从x[1],y[1] 开始 nNodeNum,有效数据节点的个数。 b,为输出的多项式系数,b[i] 为b[i-1]次项。b[0],没有用。 b,有10个元素ok。
上传时间: 2014-01-12
上传用户:变形金刚
verilog程序,实现两个16bit数乘法,采用booth算法,基于状态机实现,分层次为datapath和controller两个子模块,testBench测试通过
上传时间: 2015-08-13
上传用户:xinyuzhiqiwuwu
里面包含一个PDF文档,29页,包含ID3、SG-1等三个数据挖掘经典算法的源代码。仔细研究会有收获。
标签: 文档
上传时间: 2013-12-10
上传用户:wang0123456789
We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.
标签: represented integers group items
上传时间: 2016-01-17
上传用户:jeffery
用游标的方法实现对称差的计算,即 (A-B)+(B-A)
上传时间: 2016-05-23
上传用户:远远ssad
在一个操场的四周摆放着n 堆石子。现要将石子有次序地合并成一堆。规定在合并过程 中最多可以有m(k)次选k 堆石子合并成新的一堆,2≤k≤n,合并的费用为新的一堆的石子 数。试设计一个算法,计算出将n 堆石子合并成一堆的最小总费用。
上传时间: 2013-12-13
上传用户:cc1015285075
词法分析器 对输入一个函数,并对其分析main() { int a,b a = 10 b = a + 20 }
上传时间: 2013-12-20
上传用户:hfmm633