diff --git a/PAT/PAT-B/CPP/1063.计算谱半径.cpp b/PAT/PAT-B/CPP/1063.计算谱半径.cpp new file mode 100644 index 0000000..c264076 --- /dev/null +++ b/PAT/PAT-B/CPP/1063.计算谱半径.cpp @@ -0,0 +1,15 @@ +#include +#include +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; +}