1.
#include <iostream>
using namespace std;
int main()
{
int n, i, x, minn;
cin >> n >> minn;
for (i=2; i<=n; i++)
{
cin >> x;
if (x<minn) minn=x;
}
cout << minn;
return 0;
}
2.
#include <iostream>
using namespace std;
int main()
{
int x, maxx;
cin >> x;
maxx=x;
while (x!=0)
{
if (x>maxx) maxx=x;
cin >> x;
}
cout << maxx;
return 0;
}