1063. 计算谱半径(20)

来源:互联网 发布:python 折线图 编辑:程序博客网 时间:2024/04/30 12:10

1063. 计算谱半径(20)

#include <stdio.h>#include <math.h>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;}
0 0
原创粉丝点击