数字运算,判断一个数是否接近素数 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
上传用户:变形金刚
用于OMNeT++的模板,可仿真几种经典的无线传感网络节点定位算法,如dv-hop, robust positioning
上传时间: 2013-11-26
上传用户:zhichenglu
本文对几何模型匹配方法进行了研究,提出了一套完整的人脸定位算法。在预处理部分,采用了特别的增强人脸特征与脸部皮肤之间对比度的方法及局域取阈值二值化方法,改进了预处理的效果。在图像分割部分,实现了经典的分合算法,并且使用成组算法改进了分合的效果。在人脸匹配部分,实现了基于眼睛和嘴的几何模型匹配,并对评价函数的构造进行了研究
上传时间: 2013-12-25
上传用户:lixinxiang
本文介绍的是小波变换在人脸识别当中应用,是篇硕士论文,介绍了多种小波人脸识别算法,有基于离散小波的人脸检测与特征定位算法,基于小波变换的PCA人脸识别算法,基于小波变换和人工神经网络的人脸识别算法,基于小波变换和支持向量机的人脸识别算法,内容全面,具有很高的参考学习价值。
上传时间: 2014-01-05
上传用户:familiarsmile
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
程序应用扩展卡尔曼滤波,实现单站定位算法。
上传时间: 2016-06-13
上传用户:yyyyyyyyyy
人脸识别技术可以应用于基于网络的身份认证,我们实现了基于WebCam的人脸识别与跟踪系统。本文以WebCam采集的视频流为数据源,截取视频流中的单帧图像,通过转换色彩空间、人脸肤色建模、后处理操作和人脸定位算法实现了人脸检测,并以此为基础实现了在视频流中对于人脸的跟踪。试验结果表明,我们所实现的人脸识别算法适用于近距离人脸的检测,可以应用于基于WebCam的身份认证。
上传时间: 2014-01-18
上传用户:kristycreasy
车牌识别系统图像处理函数,包括二值化,边缘检测和定位算法
上传时间: 2016-07-09
上传用户:tonyshao