Location:
Search - 2314
Search list
Description: 数字运算,判断一个数是否接近素数
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-numerical operations, judge whether a few close-A few number n is a number such that the sum of its digits divides itself. For example, 111 n is a 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 number n if the sum of its digits divides its value. Given b (2 lt; = b lt; = 10) and a number in base b, determine whether it n is a 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 n is a number, and "no" otherwise. Sample Input 101112 110 101236 1000 8
Platform: |
Size: 1151 |
Author: 王冠 |
Hits:
Description: 接收红外遥控,控制2314
Platform: |
Size: 169656 |
Author: 闵运华 |
Hits:
Description: LCD+2314+功放 SONIX MCU
Platform: |
Size: 10771 |
Author: huang |
Hits:
Description: EMC mcu 控制功放 带2314+LCD
Platform: |
Size: 4285 |
Author: huang |
Hits:
Description: 音量集成电路2314的c语言源程序
Platform: |
Size: 745 |
Author: zhouzh8 |
Hits:
Description: 数字运算,判断一个数是否接近素数
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-numerical operations, judge whether a few close-A few number n is a number such that the sum of its digits divides itself. For example, 111 n is a 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 number n if the sum of its digits divides its value. Given b (2 lt; = b lt; = 10) and a number in base b, determine whether it n is a 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 n is a number, and "no" otherwise. Sample Input 101112 110 101236 1000 8
Platform: |
Size: 1024 |
Author: 王冠 |
Hits:
Description: 接收红外遥控,控制2314-Receiving infrared remote control 2314
Platform: |
Size: 168960 |
Author: 闵运华 |
Hits:
Description: LCD+2314+功放 SONIX MCU-LCD+ 2314+ Amplifier SONIX MCU
Platform: |
Size: 10240 |
Author: huang |
Hits:
Description: EMC mcu 控制功放 带2314+LCD-EMC mcu control amplifier with 2314+ LCD
Platform: |
Size: 4096 |
Author: huang |
Hits:
Description: pt2314drive pt2314 rive-pt2314drive
Platform: |
Size: 3072 |
Author: yws |
Hits:
Description: 音量集成电路PT2314的控制源程序,这个只是个试验程序,如果加上其它,如遥控接收等,就可以用遥控器控制2314的音量,音调,输入切换等控制了。-The volume control IC PT2314 source, this is just a test program, if coupled with other, such as the remote control receiver, etc., you can use the remote control 2314 of the volume, tone, input switching control.
Platform: |
Size: 1024 |
Author: 周子皓 |
Hits:
Description: PT6311VFD+PT2314功放程序带手动收音-PT6311VFD+ PT2314 radio power amplifier with manual procedures
Platform: |
Size: 111616 |
Author: sgd |
Hits:
Description: WGS-84转换为BJ-54自我整理,实现GPS转换的理论性描述,对编程很有用处-WGS-84 BJ-54 converted to self-organize to achieve conversion of the theoretical description of GPS, very useful for programming
Platform: |
Size: 331776 |
Author: john |
Hits:
Description: zoj 2314 acm algoruthm 算法题-zoj 2314 acm algoruthm zju
Platform: |
Size: 1024 |
Author: 朱俊杰 |
Hits:
Description: 这是一个flash源文件,效果很好,测试平台为flash 8.0(如果提示问题请选择合适的版本试试),代码的效果是:使用任意变形工具进行绘画-This is a flash source file, the effect is very good, the test platform for Flash 8 ( if the question please choose the right version to try), code effect is: using arbitrary deformation tools for painting
Platform: |
Size: 41984 |
Author: |
Hits:
Description: PT2314程序...输入选择,主音量,高低音控制-The PT2314 program ... input selector, master volume, bass and treble control
Platform: |
Size: 38912 |
Author: 小曾 |
Hits:
Description: 这是一个插值函数,通过此函数能调整大小,通过调用函数就可以了-This is an interpolation function, the function can adjust the size
Platform: |
Size: 1024 |
Author: lihaichao |
Hits:
Description: 智能化仪表在化工过程控制中的应用研究_任永彬,一篇关于智能仪器在化工过程控制中的应用-For the application of intelligent instrument in chemical industry process control _ Ren Yongbin, an article about the application of intelligent instrument in chemical industry process control
Platform: |
Size: 47104 |
Author: 李礼 |
Hits: