1)#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int32_t arr[n];
for (size_t i = 0; i < n; ++i)
cin >> arr[i];
}
int32_t max = arr[0], min = arr[0];
for (auto &i : arr)
if (i > max) max = i;
if (i < min) min = i;
cout << static_cast<float>(max + min) / 2 << "\n";
return 0;
1)#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int32_t arr[n];
for (size_t i = 0; i < n; ++i)
{
cin >> arr[i];
}
int32_t max = arr[0], min = arr[0];
for (auto &i : arr)
{
if (i > max) max = i;
if (i < min) min = i;
}
cout << static_cast<float>(max + min) / 2 << "\n";
return 0;
}