2016年3月30日

软件测试作业4

摘要: (a)控制流图 (b)保存素数的数组长度为3时。t2=(n=5)会超出数组范围,而t1=(n=3)不会 (c)n=0 (d) 节点覆盖{1,2,3,4,5,6,4,7,8,2,9,10,11,9,12} 边覆盖{(1,2),(2,3),(3,4),(4,5),(5,6),(6,4),(4,5),(5 阅读全文

posted @ 2016-03-30 19:28 wos1239 阅读(184) 评论(0) 推荐(0) 编辑

2016年3月19日

软件测试作业三 尝试使用JUnit

摘要: 写一个判断三角形种类的代码,对其进行测试。 判断三角形代码: 测试代码: 运行结果: 阅读全文

posted @ 2016-03-19 21:46 wos1239 阅读(178) 评论(0) 推荐(0) 编辑

2016年3月7日

软件测试作业2:读代码回答问题

摘要: 一、错误代码: public int findLast (int[] x, int y) { //Effects: If x==null throw NullPointerException // else return the index of the last element // in x t 阅读全文

posted @ 2016-03-07 00:22 wos1239 阅读(149) 评论(0) 推荐(0) 编辑

2016年3月6日

软件测试作业1:描述一个曾遇到的错误

摘要: 错误:运算时中间结果超出范围。 进行一些整数的乘除运算,最终结果在long long 以内,我先算的全部的乘法,导致中间的结果超出了long long表示的范围。 发现方法:输出中间结果发现有负数。 改正方法:应该适当的优先进行能除尽的除法运算。 阅读全文

posted @ 2016-03-06 23:59 wos1239 阅读(134) 评论(0) 推荐(0) 编辑

2015年6月16日

hdu1064Financial Management

摘要: Problem DescriptionLarry graduated this year and finally has a job. He’s making a lot of money, but somehow never seems to have enough. Larry has deci... 阅读全文

posted @ 2015-06-16 20:40 wos1239 阅读(115) 评论(0) 推荐(0) 编辑

hdu1161Eddy's mistakes

摘要: Problem DescriptionEddy usually writes articles ,but he likes mixing the English letter uses, for example "computer science" is written frequently "co... 阅读全文

posted @ 2015-06-16 20:24 wos1239 阅读(149) 评论(0) 推荐(0) 编辑

hdu1020Encoding

摘要: Problem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method: 1. Each sub-string containing k same char... 阅读全文

posted @ 2015-06-16 20:06 wos1239 阅读(137) 评论(0) 推荐(0) 编辑

hdu1215七夕节

摘要: Problem Description七夕节那天,月老来到数字王国,他在城门上贴了一张告示,并且和数字王国的人们说:"你们想知道你们的另一半是谁吗?那就按照告示上的方法去找吧!" 人们纷纷来到告示前,都想知道谁才是自己的另一半.告示如下:数字N的因子就是所有比N小又能被N整除的所有正整数,如12的因... 阅读全文

posted @ 2015-06-16 19:51 wos1239 阅读(203) 评论(0) 推荐(0) 编辑

hdu120118岁生日

摘要: Problem DescriptionGardon的18岁生日就要到了,他当然很开心,可是他突然想到一个问题,是不是每个人从出生开始,到达18岁生日时所经过的天数都是一样的呢?似乎并不全都是这样,所以他想请你帮忙计算一下他和他的几个朋友从出生到达18岁生日所经过的总天数,让他好来比较一下。Input... 阅读全文

posted @ 2015-06-16 19:49 wos1239 阅读(160) 评论(0) 推荐(0) 编辑

2015年6月10日

hdu1175连连看

摘要: Problem Description“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩... 阅读全文

posted @ 2015-06-10 02:56 wos1239 阅读(165) 评论(0) 推荐(0) 编辑

导航