- 博客(13)
- 收藏
- 关注
原创 水仙花数
Problem Description春天是鲜花的季节,水仙花就是其中最迷人的代表,数学上有个水仙花数,他是这样定义的:“水仙花数”是指一个三位数,它的各位数字的立方和等于其本身,比如:153=1^3+5^3+3^3。现在要求输出所有在m和n范围内的水仙花数。 Input输入数据有多组,每组占一行,包括两个整数m和n(100 Output对于
2014-12-17 22:11:04 282
原创 素数判定
Problem Description对于表达式n^2+n+41,当n在(x,y)范围内取整数值时(包括x,y)(-39 Input输入数据有多组,每组占一行,由两个整数x,y组成,当x=0,y=0时,表示输入结束,该行不做处理。 Output对于每个给定范围内的取值,如果表达式的值都为素数,则输出"OK",否则请输出“Sorry”,每组输出占一行。
2014-12-17 18:12:02 430
原创 Fibbonacci Number
Problem DescriptionYour objective for this question is to develop a program which will generate a fibbonacci number. The fibbonacci function is defined as such:f(0) = 0f(1) = 1f(n) = f(n-1)
2014-12-16 11:21:54 384
原创 Elevator
Problem DescriptionThe highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified
2014-12-13 23:30:50 259
原创 Elevator
Problem DescriptionThe highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified
2014-12-13 23:15:58 223
原创 Let the Balloon Rise
Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest i
2014-12-13 11:56:15 203
原创 求绝对值
Problem Description求实数的绝对值。 Input输入数据有多组,每组占一行,每行包含一个实数。 Output对于每组输入数据,输出它的绝对值,要求每组数据输出一行,结果保留两位小数。 Sample Input123-234.00 Sample Output123.00234
2014-12-12 13:44:19 1632
原创 闰年
任意输入任意数为天数,以2010年1月1日为起点,判断输入的数字为多少天后,当天的年月日及星期几? 例如 输入 3 则输出为: 2010年1月4日 星期一#includeusing namespace std;int main(){ int year=2010,mouth=1,day=1,week=5; int n; cin>>n; week=(n+5)%7; whi
2014-12-12 13:31:44 215
原创 计算球体积
Problem Description根据输入的半径值,计算球的体积。 Input输入数据有多组,每组占一行,每行包括一个实数,表示球的半径。 Output输出对应的球的体积,对于每组输入数据,输出一行,计算结果保留三位小数。 Sample Input11.5 Sample Output4.1891
2014-12-11 11:54:56 289
原创 计算两点间的距离
Problem Description输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。 Input输入数据有多组,每组占一行,由4个实数组成,分别表示x1,y1,x2,y2,数据之间用空格隔开。 Output对于每组输入数据,输出一行,结果保留两位小数。 Sample Input0 0 0 10 1 1 0
2014-12-11 10:35:31 610
原创 A+B for Input-Output Practice (VIII)
Problem DescriptionYour task is to calculate the sum of some integers. InputInput contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and
2014-12-11 09:35:30 224
原创 A+B for Input-Output Practice (VII)
Problem DescriptionYour task is to Calculate a + b. InputThe input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
2014-12-11 08:59:35 270
原创 A+B for Input-Output Practice (VI)
题目Problem DescriptionYour task is to calculate the sum of some integers. InputInput contains multiple test cases, and one case one line. Each case starts with an integer N, and then N
2014-12-11 08:52:11 219
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人