代码 #include <stdio.h> #include <math.h> int main() { int n; scanf("%d", &n); double max = 0; for(int i=0; i<n; i++){ int a, b; scanf("%d %d", &a, &b); double t = sqrt(a*a+b*b); if(t>max){ max = t; } } printf("%.2lf\n", max); return 0; } 注解 水题 结果