Problem Description输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。Input输入数据有多组,每组占一行,由4个实数组成,分别表示x1,y1,x2,y2,数据之间用空格隔开。Output对于每组输入数据,输出一行,结果保留两位小数。Sample Input0 0 0 1 0 1 1 0Sample Output1.00 1.41 1 #include 2 #include 3 int main() 4 { 5 double x1,y1,x2,y2; 6 while(~scanf("%lf%lf%lf%lf",&x1,&y Read More
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
其实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
暴力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