Create 1063.计算谱半径.cpp

This commit is contained in:
hao14293
2018-11-25 17:58:37 +08:00
committed by GitHub
parent fe2511de09
commit e323cca9ce

View File

@@ -0,0 +1,15 @@
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n, a, b;
float max = 0.0;
cin >> n;
for(int i = 0; i < n; i++){
cin >> a >> b;
float temp = sqrt(a * a + b * b);
if(temp > max) max = temp;
}
printf("%.2f", max);
return 0;
}