03 2012 档案

摘要:Problem 1001Easy or notTime Limit: 1000msMemory Limit: 65536kbDescriptionWe are wondering how easy a problem can be. According to recent research, the most easy problem may be the one which requires to output exactly the input, other than the classical A+B Problem.As our best programmer, you are ask 阅读全文
posted @ 2012-03-21 16:54 水芊芊 阅读(757) 评论(0) 推荐(0)
摘要:Problem 1000A + B ProblemTime Limit: 1000msMemory Limit: 65536kbDescriptionCalculate a + bInputThe input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line.OutputFor each pair of input integers a and b you should output the sum of a and b in one 阅读全文
posted @ 2012-03-20 22:02 水芊芊 阅读(950) 评论(0) 推荐(0)
摘要:题目:给一个不多于5位的正整数,要求:1、求它是几位数。2、逆序打印出各位数字。思路:分解出每一位上的数字。代码: 1 #include<iostream> 2 using namespace std; 3 4 int main() 5 { 6 int num; 7 cin>>num; 8 9 int wan = num / 10000;10 int qian = num % 10000 / 1000;11 int bai = num % 1000 / 100;12 int shi = num % 100 / 10;13 int ge... 阅读全文
posted @ 2012-03-20 20:03 水芊芊 阅读(334) 评论(0) 推荐(0)
摘要:题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?思路:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去掉不满足条件的排列。代码: 1 #include<iostream> 2 using namespace std; 3 4 int main() 5 { 6 for(int i=1;i<=4;i++) 7 { 8 for(int j=1; j<=4; j++) 9 {10 for(int k=1; k<=4; k++)11 {12 ... 阅读全文
posted @ 2012-03-19 20:45 水芊芊 阅读(285) 评论(1) 推荐(0)