随笔分类 -  C语言编程

上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要:Problem Description参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个集合的差,就是做集合的减法运算。(当然,大家都知道集合的定义,就是同一个集合中不会有两个相同的元素,这里还是提醒大家一下)呵呵,... 阅读全文
posted @ 2014-10-27 17:07 zqxLonely 阅读(618) 评论(0) 推荐(0)
摘要:描述现在给你一个正整数N,要你快速的找出在2.....N这些数里面所有的素数。输入给出一个正整数数N(N 2 #include 3 #include 4 #define N 2000001 5 6 int main(){ 7 int i; 8 int j; 9 ch... 阅读全文
posted @ 2014-10-27 16:36 zqxLonely 阅读(922) 评论(0) 推荐(0)
摘要:Problem DescriptionIn many applications very large integers numbers arerequired. Some of these applications are using keys for secure transmission ofd... 阅读全文
posted @ 2014-10-27 16:33 zqxLonely 阅读(271) 评论(0) 推荐(0)
摘要:输入第一行有一个整数m(1 2 #include 3 #define N 1000001 4 5 int main(){ 6 int T; 7 char number[N]; 8 int temp; 9 int i;10 int length;11 ... 阅读全文
posted @ 2014-10-27 16:31 zqxLonely 阅读(336) 评论(0) 推荐(0)
摘要:描述相传韩信才智过人,从不直接清点自己军队的人数,只要让士兵先后以三人一排、五人一排、七人一排地变换队形,而他每次只掠一眼队伍的排尾就知道总人数了。输入3个非负整数a,b,c ,表示每种队形排尾的人数(a 2 3 int main(){ 4 int a; 5 int b; 6 ... 阅读全文
posted @ 2014-10-27 16:29 zqxLonely 阅读(17189) 评论(0) 推荐(0)
摘要:Problem DescriptionContest time again! How excited it is to see balloonsfloating around. But to tell you a secret, the judges' favorite time isguessin... 阅读全文
posted @ 2014-10-27 16:27 zqxLonely 阅读(244) 评论(0) 推荐(0)
摘要: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 wh... 阅读全文
posted @ 2014-10-27 16:25 zqxLonely 阅读(353) 评论(0) 推荐(0)
摘要:Problem DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In... 阅读全文
posted @ 2014-10-27 16:24 zqxLonely 阅读(267) 评论(0) 推荐(0)
摘要:Problem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method:1. Each sub-string containing k same charac... 阅读全文
posted @ 2014-10-27 16:22 zqxLonely 阅读(313) 评论(0) 推荐(0)
摘要:Problem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).InputInput consists of a sequence o... 阅读全文
posted @ 2014-10-27 16:20 zqxLonely 阅读(221) 评论(0) 推荐(0)
摘要:Problem Description给定两个正整数,计算这两个数的最小公倍数。Input输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数.Output对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。Sample Input10 14Sample Output70 1... 阅读全文
posted @ 2014-10-27 16:18 zqxLonely 阅读(283) 评论(0) 推荐(0)
摘要:Problem DescriptionEddy usually writes articles ,but he likes mixing the English letter uses, for example "computer science" is written frequently "co... 阅读全文
posted @ 2014-10-27 16:16 zqxLonely 阅读(263) 评论(0) 推荐(0)
摘要:Problem DescriptionGiven an positive integer A (1 2 #include 3 4 5 int main(){ 6 int A; 7 int timer; 8 9 while(1){10 t... 阅读全文
posted @ 2014-10-27 16:15 zqxLonely 阅读(261) 评论(0) 推荐(0)
摘要:Problem Description统计给定的n个数中,负数、零和正数的个数。Input输入数据有多组,每组占一行,每行的第一个数是整数n(n 2 3 int main(){ 4 int n; 5 int i; 6 int a; 7 int b; 8 i... 阅读全文
posted @ 2014-10-27 16:14 zqxLonely 阅读(328) 评论(0) 推荐(0)
摘要:Problem Description输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。Input输入数据有多组,每组占一行,有三个字符组成,之间无空格。Output对于每组输入数据,输出一行,字符中间用一个空格分开。Sample InputqweasdzxcSample Outp... 阅读全文
posted @ 2014-10-27 16:13 zqxLonely 阅读(349) 评论(0) 推荐(0)
摘要:Problem Description输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。Input输入数据有多组,每组占一行,由4个实数组成,分别表示x1,y1,x2,y2,数据之间用空格隔开。Output对于每组输入数据,输出一行,结果保留两位小数。Sample Input0 0... 阅读全文
posted @ 2014-10-27 16:11 zqxLonely 阅读(907) 评论(0) 推荐(0)
摘要:Problem Description根据输入的半径值,计算球的体积。Input输入数据有多组,每组占一行,每行包括一个实数,表示球的半径。Output输出对应的球的体积,对于每组输入数据,输出一行,计算结果保留三位小数。Sample Input11.5Sample Output4.18914.13... 阅读全文
posted @ 2014-10-27 16:10 zqxLonely 阅读(724) 评论(0) 推荐(0)
摘要:Problem Description求实数的绝对值。Input输入数据有多组,每组占一行,每行包含一个实数。Output对于每组输入数据,输出它的绝对值,要求每组数据输出一行,结果保留两位小数。Sample Input123-234.00Sample Output123.00234.00 1 #i... 阅读全文
posted @ 2014-10-27 16:09 zqxLonely 阅读(255) 评论(0) 推荐(0)
摘要:Problem Description输入一个百分制的成绩t,将其转换成对应的等级,具体转换规则如下:90~100为A;80~89为B;70~79为C;60~69为D;0~59为E;Input输入数据有多组,每组占一行,由一个整数组成。Output对于每组输入数据,输出一行。如果输入数据不在0~10... 阅读全文
posted @ 2014-10-27 16:08 zqxLonely 阅读(693) 评论(0) 推荐(0)
摘要:Problem Description给定一个日期,输出这个日期是该年的第几天。Input输入数据有多组,每组占一行,数据格式为YYYY/MM/DD组成,具体参见sample input ,另外,可以向你确保所有的输入数据是合法的。Output对于每组输入数据,输出一行,表示该日期是该年的第几天。S... 阅读全文
posted @ 2014-10-27 16:06 zqxLonely 阅读(197) 评论(0) 推荐(0)

上一页 1 ··· 6 7 8 9 10 11 12 下一页