HDU2071(水题)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2071

很少见到这样的水题了,连自己也变水了~~~

代码如下:

 1 #include <cstdio>
 2 using namespace std;
 3 
 4 int main()
 5 {
 6     int n;
 7     int t;
 8     double stu, max;
 9     while(scanf("%d", &t) != EOF)
10     {
11           for(int j = 0; j < t; j++)
12           {
13                max = 0;
14                scanf("%d", &n);
15                for(int i = 0; i < n; i++)
16                {
17                   scanf("%lf", &stu);
18                   if(stu > max)
19                   {
20                          max = stu;       
21                   }        
22                }
23                printf("%.2lf\n", max);
24           }                  
25     }
26     return 0;    
27 }
原文地址:https://www.cnblogs.com/10jschen/p/2645813.html