Problem Description输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。Input输入数据有多组,每组占一行,有三个字符组成,之间无空格。Output对于每组输入数据,输出一行,字符中间用一个空格分开。Sample Inputqwe asd zxcSample Outpute q w a d s c x z 1 #include 2 #include 3 using namespace std; 4 bool cmp(char a,char b) 5 { 6 return a<b; 7 } 8 int main() 9 {10 char ... Read More
posted @ 2013-06-15 21:05
瓶哥
Views(261)
Comments(0)
Diggs(0)
Problem Descriptions(n)是正整数n的真因子之和,即小于n且整除n的因子和.例如s(12)=1+2+3+4+6=16.如果任何数m,s(m)都不等于n,则称n为不可摸数.Input包含多组数据,首先输入T,表示有T组数据.每组数据1行给出n(2 2 #include 3 int mark[1001]={0}; 4 void fun(void) 5 { 6 mark[1]=1; 7 for(int n=4;n1000) break; 19 }20 if(s<1001)21 mark[s... Read More
posted @ 2013-06-15 20:35
瓶哥
Views(303)
Comments(0)
Diggs(0)
其实printf输出4个数就行。。Problem DescriptionA DFS(digital factorial sum) number is found by summing the factorial of every digit of a positive integer.For example ,consider the positive integer 145 = 1!+4!+5!, so it's a DFS number.Now you should find out all the DFS numbers in the range of int( [1, 2147 Read More
posted @ 2013-06-15 20:31
瓶哥
Views(168)
Comments(0)
Diggs(0)
暴力5循环解决。。Problem Description=== Op tech briefing, 2002/11/02 06:42 CST ==="The item is locked in a Klein safe behind a painting in the second-floor library. Klein safes are extremely rare; most of them, along with Klein and his factory, were destroyed in World War II. Fortunately old Brumbaugh Read More
posted @ 2013-06-15 17:08
瓶哥
Views(190)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号