// PATn.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
unsigned n;
cin >> n;
double max = 0.0;
int a, b;
for (unsigned i = 0; i < n; ++i)
{
cin >> a >> b;
double tmp = sqrt(pow(a, 2) + pow(b, 2));
if (tmp > max)
max = tmp;
}
cout.setf(ios::fixed);
cout <<setprecision(2)<< max;
system("pause");
return 0;
}
网友评论