RQNOJ 358线段

#include <cmath>
#include <cstdio>
#include <iostream>

using namespace std;

double dis(double x1, double y1, double x2, double y2) {
	return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}

int main() {
	double x1, y1, r1, x2, y2, r2;
	while (scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &r1, &x2, &y2, &r2) != EOF) {
		double d = dis(x1, y1, x2, y2);
		printf ("%.6lf\n", 2*d); 
	}
	return 0;
}

  

posted on 2012-05-13 08:23  Try86  阅读(159)  评论(0)    收藏  举报