//MH RIYAD
//facebook.com/riadzz
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<string>
#include<map>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<vector>
using namespace std;
class riyad
{
public:
double x;
double y;
};
double find_dis(double a, double b, double c, double d)
{
double res = sqrt(((a - c)*(a - c)) + ((b - d)*(b - d)));
return res;
}
int main()
{
double n, k;
riyad ary[105];
while (~scanf("%lf %lf", &n, &k))
{
for (int i = 0; i < n; i++)
{
cin >> ary[i].x >> ary[i].y;
}
double sum = 0.0;
for (int i = 0; i < n-1; i++)
{
sum= sum+ find_dis(ary[i].x, ary[i].y, ary[i+1].x, ary[i+1].y);
}
sum /= 50.0;
printf("%.9lf\n", sum*k);
}
// system("pause");
return 0;
}
//facebook.com/riadzz
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<string>
#include<map>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<vector>
using namespace std;
class riyad
{
public:
double x;
double y;
};
double find_dis(double a, double b, double c, double d)
{
double res = sqrt(((a - c)*(a - c)) + ((b - d)*(b - d)));
return res;
}
int main()
{
double n, k;
riyad ary[105];
while (~scanf("%lf %lf", &n, &k))
{
for (int i = 0; i < n; i++)
{
cin >> ary[i].x >> ary[i].y;
}
double sum = 0.0;
for (int i = 0; i < n-1; i++)
{
sum= sum+ find_dis(ary[i].x, ary[i].y, ary[i+1].x, ary[i+1].y);
}
sum /= 50.0;
printf("%.9lf\n", sum*k);
}
// system("pause");
return 0;
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন