题目:
代码:
#include<cstdio> #include<cmath> int main(){ int n,a,b; double max=0,sum=0; scanf("%d",&n); while(n--){ scanf("%d%d",&a,&b); sum=sqrt(a*a+b*b); if(max<sum) max=sum; } printf("%.2f",max); return 0; }
原文:https://www.cnblogs.com/miao-xixixi/p/12528300.html