虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

C<b>16</b>4

  • 数字运算

    数字运算,判断一个数是否接近素数 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

  • 电力系统在台稳定计算式电力系统不正常运行方式的一种计算。它的任务是已知电力系统某一正常运行状态和受到某种扰动

    电力系统在台稳定计算式电力系统不正常运行方式的一种计算。它的任务是已知电力系统某一正常运行状态和受到某种扰动,计算电力系统所有发电机能否同步运行 1运行说明: 请输入初始功率S0,形如a+bi 请输入无限大系统母线电压V0 请输入系统等值电抗矩阵B 矩阵B有以下元素组成的行矩阵 1正常运行时的系统直轴等值电抗Xd 2故障运行时的系统直轴等值电抗X d 3故障切除后的系统直轴等值电抗 请输入惯性时间常数Tj 请输入时段数N 请输入哪个时段发生故障Ni 请输入每时段间隔的时间dt

    标签: 电力系统 计算 运行

    上传时间: 2015-06-13

    上传用户:it男一枚

  • 一:需求分析 1. 问题描述 魔王总是使用自己的一种非常精练而抽象的语言讲话,没人能听懂,但他的语言是可逐步解释成人能听懂的语言,因为他的语言是由以下两种形式的规则由人的语言逐步抽象上去的: -

    一:需求分析 1. 问题描述 魔王总是使用自己的一种非常精练而抽象的语言讲话,没人能听懂,但他的语言是可逐步解释成人能听懂的语言,因为他的语言是由以下两种形式的规则由人的语言逐步抽象上去的: ----------------------------------------------------------- (1) a---> (B1)(B2)....(Bm) (2)[(op1)(p2)...(pn)]---->[o(pn)][o(p(n-1))].....[o(p1)o] ----------------------------------------------------------- 在这两种形式中,从左到右均表示解释.试写一个魔王语言的解释系统,把 他的话解释成人能听得懂的话. 2. 基本要求: 用下述两条具体规则和上述规则形式(2)实现.设大写字母表示魔王语言的词汇 小写字母表示人的语言的词汇 希腊字母表示可以用大写字母或小写字母代换的变量.魔王语言可含人的词汇. (1) B --> tAdA (2) A --> sae 3. 测试数据: B(ehnxgz)B 解释成 tsaedsaeezegexenehetsaedsae若将小写字母与汉字建立下表所示的对应关系,则魔王说的话是:"天上一只鹅地上一只鹅鹅追鹅赶鹅下鹅蛋鹅恨鹅天上一只鹅地上一只鹅". | t | d | s | a | e | z | g | x | n | h | | 天 | 地 | 上 | 一只| 鹅 | 追 | 赶 | 下 | 蛋 | 恨 |

    标签: 语言 抽象

    上传时间: 2014-12-02

    上传用户:jkhjkh1982

  • /**************************************************************************************************

    /************************************************************************************************** * 简介 * * 本模块仅使用于字符显示液晶模块 * * 当前版本的驱动仅支持以下类型LCD模块驱动: * Hitachi HD44780 或与之兼容的芯片. * * LCD显示函数支持以下格式: * 1 line x 8 characters * 1 line x 16 characters 2 lines x 16 characters 4 lines x 16 characters * 1 line x 20 characters 2 lines x 20 characters 4 lines x 20 characters * 1 line x 24 characters 2 lines x 24 characters * 1 line x 40 characters 2 lines x 40 characters *说明: * 1 line x 16 characters 需要定义为2*8的液晶模块 **************************************************************************************************/

    标签:

    上传时间: 2013-12-06

    上传用户:zhliu007

  • 这是我自已写的HD44780 LCD1602液晶屏的程序

    这是我自已写的HD44780 LCD1602液晶屏的程序,是基于AVR单片机上实现的。 /************************************************************************************************** * 简介 * * 本模块仅使用于字符显示液晶模块 * * 当前版本的驱动仅支持以下类型LCD模块驱动: * Hitachi HD44780 或与之兼容的芯片. * * LCD显示函数支持以下格式: * 1 line x 16 characters 2 lines x 16 characters 4 lines x 16 characters * 1 line x 20 characters 2 lines x 20 characters 4 lines x 20 characters * 1 line x 24 characters 2 lines x 24 characters * 1 line x 40 characters 2 lines x 40 characters *说明: * 1 line x 16 characters 需要定义为2*8的液晶模块 * * 不支持外部内存模式 **************************************************************************************************/

    标签: 44780 1602 LCD HD

    上传时间: 2015-11-20

    上传用户:王楚楚

  • We have a group of N items (represented by integers from 1 to N), and we know that there is some tot

    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

  • The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical)

    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

  • 自己制作51开发板. 带自恢复保险丝

    自己制作51开发板. 带自恢复保险丝,试验安全,40Pin锁紧插座适用于4~40脚芯片,可以自由配置电源引脚。 板上资源: 1、6个高亮数码管显示(数字和字母显示) 2、8个独立优质按键(2Pin)(人机接口输入) 3、8个高亮发光二极管(跑马灯、指示灯、红绿灯等) 4、标准的RS232通信接口(PC通信) 5、一体化红外接收头(高灵敏度) 6、遥控器用红外发射管(广发射 角)可以模拟遥控器。 7、蜂鸣器(报警以及声音提示) 8、一路继电器输出 9、EEPROM 24C02(数据存储) 10、ADC0832转换器接口(模数转换) 11、DS18B20接口(精密温度检测) 12、USB口供电,带自恢复保险丝保护 13、加装优质电源开关 14、晶振采用拔插方式,可以使用于不同频率 15、DC电机接口(直接接入小功率直流电机即可) 16、4相步进电机接口(直接接入即可) 17、音频扬声器接口(直接接入可以播放音乐、声波) 18、经典复位电路 19、ISP 10Pin下载线接口 20、标准并口下载线

    标签: 51开发板 自恢复保险丝

    上传时间: 2016-07-22

    上传用户:yzy6007

  • 这是我收藏多年的DOS几个源代码

    这是我收藏多年的DOS几个源代码,希望对各位看官有点用,从中学习到C的精华。4

    标签: DOS 源代码

    上传时间: 2016-12-08

    上传用户:s363994250

  • 功能按键

    功能按键,C51功能按键的C程序,使用4个按键,分别为功能按键,上调,下调按键,最后一个确认键

    标签: 按键

    上传时间: 2017-01-05

    上传用户:海陆空653