- 博客(8)
- 收藏
- 关注
原创 G - Ugly Numbers
题目Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, … shows the first 11 ugly numbers. By convention, 1 is included. Write a program t
2017-07-25 21:02:39
257
原创 D - Ignatius and the Princess IV
题目“OK, you are not too bad, em… But you can never pass the next test.” feng5166 says. “I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to tell
2017-07-25 20:44:11
181
原创 C - Summary
题目Small W is playing a summary game. Firstly, He takes N numbers. Secondly he takes out every pair of them and add this two numbers, thus he can get N*(N - 1)/2 new numbers. Thirdly he deletes the r...
2017-07-25 20:30:00
343
原创 A - {A} + {B}
题目给你两个集合,要求{A} + {B}. 注:同一个集合中不会有两个相同的元素.Input 每组输入数据分为三行,第一行有两个数字n,m(0<n,m<=10000)分别表示集合A和集合B的元素个数.后两行分别表示集合A和集合B.每个元素为不超出int范围的整数,每个元素之间有一个空格隔开.Output 针对每组数据输出一行数据,表示合并后的集合,要求从小到大输出,每个元素之间有一个空格隔开
2017-07-25 20:13:38
191
原创 G - sort简单运用,多组数据
题目给你n个整数,请按从大到小的顺序输出其中前m大的数。 Input 每组测试数据有两行,第一行有两个数n,m (0<n,m<1000000)第二行包含n个各不相同,且都处于区间−500000,500000−500000,500000的整数。 Output 对每组测试数据按从大到小的顺序输出前m大的数。 Sample Input 5 3 3 -35 92 213 -644Sample Out
2017-07-25 20:03:26
266
原创 D - 格式化输入输出
题目还记得中学时候学过的杨辉三角吗?具体的定义这里不再描述,你可以参考以下的图形: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 Input 输入数据包含多个测试实例,每个测试实例的输入只包含一个正整数n(1<=n<=30),表示将要输出的杨辉三角的层数。 Output 对应于每一个输入,请输出相应层数的杨辉三角,每一层的整数之
2017-07-25 19:55:56
345
原创 C - 注意数据范围
题目Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city’s anniversary, a decision was taken to pave the Square with square granit
2017-07-25 19:36:22
385
原创 A - 条件语句和数组
题目读入N名学生的成绩,将获得某一给定分数的学生人数输出。 Input 测试输入包含若干测试用例,每个测试用例的格式为 第1行:N 第2行:N名学生的成绩,相邻两数字用一个空格间隔。 第3行:给定分数 当读到N=0时输入结束。其中N不超过1000,成绩分数为(包含)0到100之间的一个整数。Output 对每个测试用例,将获得给定分数的学生人数输出。Sample Input3 80
2017-07-24 22:47:43
203
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人