【杭电100题】2071 Max Num

原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=2071
#sad#
这是今天一整天,唯一一道自己做出来的题(`-_ゝ-)
不过也说明了一个道理,永远不要因为绝望而放弃
因为下一道可能就是真正的水题

#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    int n;
    while(t--)
    {
        cin>>n;
        double x=0.0;
        while(n--)
        {
            double y;
            scanf("%lf",&y);
            x=x>y?x:y;
        }
        printf("%.2f\n",x);
    }
    return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_41727666/article/details/88320889
num
max