数字运算,判断一个数是否接近素数 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
一个简单的J2ME程序键盘控制功能,图象绘画等,有两个文件组成一个物体文件,和一个MIDLET文件。没有密码
上传时间: 2015-05-24
上传用户:zhouchang199
FLASH大头贴 FLASH部分源程序解析 原来有几个前辈贴过了一些关于这个技术的代码,有JAVA的,也有FLASH COM的。现在我把FLASH部分通过摄象头获得图象信息的代码贴出来。供大家参考。 这段代码是我参考了别人的代码自己写出来的。原来的那个网站里总共提供了两个类来实现这个问题。估计贴出来大多数人也会看的眼花缭乱不知所以(其实我也没太看明白)。所以按原来程序的思路自己重新写了一部分。大多数语句都写了注释。如果大家有什么不明白的,欢迎跟贴讨论
上传时间: 2014-01-15
上传用户:三人用菜
给定一副图像和一段文字,设计某种图象处理方法将这段文字隐藏到图像中
标签: 图像
上传时间: 2013-12-25
上传用户:chenlong
上传的是C编写的算法,在图象处理方面常用到,希望对你有用
上传时间: 2014-01-01
上传用户:蠢蠢66
几个matlab的实力,包括: 非线性微分方程的求解.doc RLS,Demonstration of Wiener filter,LMS filter,Steep-descent algorithm.doc matlab下gabor滤波算法,可以提取图象纹理特征.doc
标签: matlab
上传时间: 2015-06-04
上传用户:lanhuaying
这是一个相当棒的Linux下的台球游戏,其图象水准及其游戏性绝对不输Windows的著名同类游戏snooker,包含了斯诺克和九球。如果您是一个台球爱好者或是想在Linux中实现台球大师的梦想,就一定不要错过这个游戏。
标签: Linux
上传时间: 2015-06-08
上传用户:gengxiaochao
源代码\用动态规划算法计算序列关系个数 用关系"<"和"="将3个数a,b,c依次序排列时,有13种不同的序列关系: a=b=c,a=b<c,a<b=v,a<b<c,a<c<b a=c<b,b<a=c,b<a<c,b<c<a,b=c<a c<a=b,c<a<b,c<b<a 若要将n个数依序列,设计一个动态规划算法,计算出有多少种不同的序列关系, 要求算法只占用O(n),只耗时O(n*n).
上传时间: 2013-12-26
上传用户:siguazgb
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
标签: government streamline important alphabet
上传时间: 2015-06-09
上传用户:weixiao99
一个在linux下接收音频信号的软件,可以接收卫星云图图象
上传时间: 2013-11-30
上传用户:123456wh