2071 Max Num

    xiaoxiao2024-04-21  11

    #include<iostream> #include<iomanip> #include<vector> using namespace std; int main() { int t; while (cin >> t) { int n; while (t--&&cin >> n) { double num; vector<double> v; while (n--&&cin >> num) { v.push_back(num); } double max = v[0]; for (auto c:v) if (c > max) max = c; cout << fixed << setprecision(2) << max << endl; } } return 0; }
    转载请注明原文地址: https://ju.6miu.com/read-1288208.html
    最新回复(0)