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

1.<b>5</b>

  • 一个N位数的各位数的N次方之和等于这个数

    一个N位数的各位数的N次方之和等于这个数,称为armstrong数(如:153=1^3+5^3+3^3)。编一个程序,求出2,3,4位数中所有的armstrong数。

    标签:

    上传时间: 2013-11-29

    上传用户:xiaoyunyun

  • Input The input consists of two lines. The first line contains two integers n and k which are the l

    Input The input consists of two lines. The first line contains two integers n and k which are the lengths of the array and the sliding window. There are n integers in the second line. Output There are two lines in the output. The first line gives the minimum values in the window at each position, from left to right, respectively. The second line gives the maximum values. Sample Input 8 3 1 3 -1 -3 5 3 6 7 Sample Output -1 -3 -3 -3 3 3 3 3 5 5 6 7

    标签: The two consists contains

    上传时间: 2014-12-21

    上传用户:hongmo

  • “贪吃蛇”是一种很流行的电子游戏。游戏方法如下 :一条蛇在棋盘上爬行

    “贪吃蛇”是一种很流行的电子游戏。游戏方法如下 :一条蛇在棋盘上爬行,由键盘控制其转弯;棋盘上随机地出现5个数字(1~5),当蛇的头部碰到数字时(吃数字),蛇的身体会变长。当蛇的头部撞到棋盘边界或碰到自己身体时,游戏结束。游戏结束时,蛇身体越长得分越高。

    标签: 贪吃蛇 电子游戏 爬行

    上传时间: 2013-12-17

    上传用户:ouyangtongze

  • 此源程序实现了打印出 * 金字塔的功能

    此源程序实现了打印出 * 金字塔的功能,总共输出5行,1~5行分别是1,3,5,7,9个‘* .

    标签: 源程序 打印

    上传时间: 2013-12-30

    上传用户:懒龙1988

  • 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

  • 很好的搜索: 给你很多长度不定的木棒

    很好的搜索: 给你很多长度不定的木棒,将他们分成几组,每组中的总长度作为这组的标示值,请给出一种分组方法,能使得所有标示值中的最小值最大。 Input 多组,每组两行,第一行是一个N和K,代表有N根木棒,分成K组,第二行是N个数字,代表木棒的长度。(N不超过100,K不超过20,每根木棒长度不超过1000) Output 输出所有标示值中的最小值的最大值。 Sample Input 5 3 1 3 5 7 9 5 3 89 59 68 35 29 Sample Output 8 89

    标签: 搜索 长度

    上传时间: 2013-12-23

    上传用户:nairui21

  • 编译原理的教学课件

    编译原理的教学课件,国防科技大学出版的书籍的配套课件,版本很好,对于自学很有用,这是1-5章。

    标签: 编译原理 教学课件

    上传时间: 2013-12-04

    上传用户:皇族传媒

  • Findstr.cpp运行结果: GetNext-IndexKMP的结果: 输入主串s:acabaabcaabaabcac 输入模式串t:abaabcac 主串s长=17 模式串t长=8

    Findstr.cpp运行结果: GetNext-IndexKMP的结果: 输入主串s:acabaabcaabaabcac 输入模式串t:abaabcac 主串s长=17 模式串t长=8 next[0]=-1 next[1]=-1 next[2]=0 next[3]=0 next[4]=1 next[5]=-1 next[6]=0 next[7]=-1 next[8]=0 模式串在主串的位置从第10个字符开始 GetNext-IndexKMP的结果: next[1]=0 next[2]=1 next[3]=1 next[4]=1 next[5]=2 next[6]=1 next[7]=1 模式串在主串的位置从第10个字符开始 GetNextVal-IndexKMP的结果: next[1]=0 next[2]=1 next[3]=1 next[4]=0 next[5]=2 next[6]=1 next[7]=1 模式串在主串的位置从第10个字符开始 GetNext-IndexKMP的结果: next[1]=0 next[2]=1 next[3]=1 next[4]=1 next[5]=2 next[6]=1 next[7]=1 模式串t在主串s中的位置从第10个字符开始 IndexBF的结果: 模式串t在主串s中的位置从第10个字符开始

    标签: acabaabcaabaabcac GetNext-IndexKMP abaabcac Findstr

    上传时间: 2013-12-25

    上传用户:璇珠官人

  • 试设计一个贪心算法

    试设计一个贪心算法,可以兑换1角5分、1角、5分和1分的硬币。并证明你所设计的算法可得到最优解。

    标签: 算法

    上传时间: 2013-12-23

    上传用户:6546544

  • 求和程序

    求和程序,1+3+5+……+99,基于labview8.5制作,完整程序框图

    标签: 程序

    上传时间: 2016-08-08

    上传用户:chenbhdt