数字运算,判断一个数是否接近素数 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
使用28257芯片编辑的日期增减程序,8段译码管显示
上传时间: 2015-05-28
上传用户:许小华
这是一款LED驱动IC,可以驱动6个7段LED数码管,已经通过测试。
上传时间: 2014-01-15
上传用户:zaizaibang
ZLG7289键盘显示接口芯片是一个很常用的接口芯片,至需4个IO口接可以控制显示8位的数码管显示和64个矩阵键盘的自动扫描,效果很好。
上传时间: 2015-12-12
上传用户:it男一枚
该芯片的功能是: ① 有一复位开关,能够完成芯片的复位功能。 ② 有一烹调时间设置信号,用来控制烹调时间的设置。 ③ 能够显示烹调时间的进行情况,烹调时间的单位是几分几秒。 ④ 能够测试七段数码管工作是否正常。 芯片模块划分: ① 控制状态机:用于控制微波炉工作过程中的状态转换。 ② 数据装入器:根据控制信号选择定时时间、测试数据或完成信息的装入。 ③ 定时器:负责完成烹调过程中的时间递减计数和数据译码以供七段显示数码管显示,同时还要提供烹调完成时的状态信号供控制状态机产生完成信号。
上传时间: 2016-03-21
上传用户:ippler8
利用AT89S51 单片机的T0、T1的定时计数器功能,来完成对输入的信号进行频率计数, 计数的频率结果通过8位动态数码管显示出来。要求能够对0-250KHZ 的信号频率进行准确计数,计数误差不超过±1HZ。
上传时间: 2016-04-07
上传用户:1159797854
利用AT89S51单片机的T0、T1的定时计数器功能,来完成对输入的信号进行频率计数,计数的频率结果通过8位动态数码管显示出来。要求能够对0-250KHZ的信号频率进行准确计数,计数误差不超过±1HZ
上传时间: 2014-01-07
上传用户:llandlu
利用AT89S51单片机的T0、T1的定时计数器功能,来完成对输入的信号进行频率计数,计数的频率结果通过8位动态数码管显示出来。要求能够对0-250KHZ的信号频率进行准确计数,计数误差不超过±1HZ。
上传时间: 2016-06-25
上传用户:洛木卓
利用AT89S51单片机的T0、T1的定时计数器功能,来完成对输入的信号进行频率计数,计数的频率结果通过8位动态数码管显示出来。能够对0-250KHZ的信号频率进行准确计数,同时计数误差不超过±1HZ
上传时间: 2014-12-08
上传用户:myworkpost
S08例程:本程序是显示模块的例程,所接器件为四位八段led数码管,其中PTB0-PTB3 与数码管的位选相连接,PTB4,PTB5与74LS164连接
上传时间: 2014-01-13
上传用户:chenjjer