数字运算,判断一个数是否接近素数 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
基于Verilog-HDL的硬件电路的实现 9.2 具有LCD显示单元的可编程单脉冲发生器 9.2.1 LCD显示单元的工作原理 9.2.2 显示逻辑设计的思路与流程 9.2.3 LCD显示单元的硬件实现 9.2.4 可编程单脉冲数据的BCD码化 9.2.5 task的使用方法 9.2.6 for循环语句的使用方法 9.2.7 二进制数转换BCD码的硬件实现 9.2.8 可编程单脉冲发生器与显示单元的接口 9.2.9 具有LCD显示单元的可编程单脉冲发生器的硬件实现 9.2.10 编译指令-"文件包含"处理的使用方法
标签: Verilog-HDL LCD 9.2 显示单元
上传时间: 2014-06-23
上传用户:xc216
上下文无关文法(Context-Free Grammar, CFG)是一个4元组G=(V, T, S, P),其中,V和T是不相交的有限集,S∈V,P是一组有限的产生式规则集,形如A→α,其中A∈V,且α∈(V∪T)*。V的元素称为非终结符,T的元素称为终结符,S是一个特殊的非终结符,称为文法开始符。 设G=(V, T, S, P)是一个CFG,则G产生的语言是所有可由G产生的字符串组成的集合,即L(G)={x∈T* | Sx}。一个语言L是上下文无关语言(Context-Free Language, CFL),当且仅当存在一个CFG G,使得L=L(G)。 *⇒ 例如,设文法G:S→AB A→aA|a B→bB|b 则L(G)={a^nb^m | n,m>=1} 其中非终结符都是大写字母,开始符都是S,终结符都是小写字母。
标签: Context-Free Grammar CFG
上传时间: 2013-12-10
上传用户:gaojiao1999
LCD-7279的经过调试多次已经能够实现在指定的位置显示特定的数据。 程序lcd1.c实现基本的功能,即:键盘输入0、1、2、3、4、5、6、7、8、9、a\b\c\d\e\f 在液晶的指定位置显示实现满屏或半屏显示点阵和字符,调入一幅图画的代码进行显示;
上传时间: 2014-01-14
上传用户:hgy9473
Stellaris Luminary Micro 系列之 DK-LM3S815 多个学习范例全都是基于 Keil 工程版的范例, 而范例内容列举如下: 1.BitBand 2.Comparator 3.GPIO_JTAG 4.GPIO_LED 5.Hello 6.Interrupts 7.QS_DK_LM3S815 8.SSI_Atmel 9.Timers 10.UART_Out 11.WatchDog 12.PWMgen 13.I2C_Atmel 等
标签: Comparator Stellaris Luminary BitBand
上传时间: 2013-12-31
上传用户:eclipse
Stellaris Luminary Micro ARM 系列之 DK-LM3S815 多個學習範例全都是基于 Keil 工程版的範例, 並包含 LM3S Library Source Code ,而範例內容列舉如下: 1.BitBand 2.Comparator 3.GPIO_JTAG 4.GPIO_LED 5.Hello 6.Interrupts 7.QS_DK_LM3S815 8.SSI_Atmel 9.Timers 10.UART_Out 11.WatchDog 12.PWMgen 13.I2C_Atmel 等...
标签: Stellaris Luminary Library Source
上传时间: 2013-12-26
上传用户:haohaoxuexi
The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical) of any level of nesting to XML format and vice versa. For example, >> project.name = MyProject >> project.id = 1234 >> project.param.a = 3.1415 >> project.param.b = 42 becomes with str=xml_format(project, off ) "<project> <name>MyProject</name> <id>1234</id> <param> <a>3.1415</a> <b>42</b> </param> </project>" On the other hand, if an XML string XStr is given, this can be converted easily to a MATLAB data type or structure V with the command V=xml_parse(XStr).
标签: converts Toolbox complex logical
上传时间: 2016-02-12
上传用户:a673761058
AD6.7破解文件,6.8 6.9 6.10 6.11 6.12 6.13 6.14 6.15 6.16都可以用
上传时间: 2016-05-18
上传用户:zhuimenghuadie
词法分析器 对输入一个函数,并对其分析main() { int a,b a = 10 b = a + 20 }
上传时间: 2013-12-20
上传用户:hfmm633
用户从键盘上输入10个0到99之间的数字,统计数字分布(即0—9、10—19……90—100),使用Java Applet实现。
上传时间: 2016-12-24
上传用户:linlin