1063

2017-09-05  本文已影响0人  峡迩
// 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;
}

上一篇 下一篇

猜你喜欢

热点阅读