#include#include int main(){ int n; double max=-1; scanf("%d",&n); while(n--) { double a,b,ans; scanf("%lf %lf",&a,&b); ans=sqrt(a*a+b*b); if(ans>max)max=ans; } printf("%.2lf",max); return 0;}
本文共 331 字,大约阅读时间需要 1 分钟。
#include#include int main(){ int n; double max=-1; scanf("%d",&n); while(n--) { double a,b,ans; scanf("%lf %lf",&a,&b); ans=sqrt(a*a+b*b); if(ans>max)max=ans; } printf("%.2lf",max); return 0;}
转载于:https://www.cnblogs.com/xLester/p/7570393.html