eolymp
bolt
Try our new interface for solving problems
Problems

Інстаграм

published at 8/1/21, 3:52:26 am

кто пишет на с++ — юзайте здесь scanf вместо cin и вы удивитесь результату (особенно если уже пробовали через cin)) (тем временем сложность: ↘↘↘)

published at 2/21/24, 7:50:44 pm

include <bits/stdc++.h>

using namespace std;

typedef long long ll; typedef long double ld;

void solve() {

unsigned long long n;
cin>>n;
n--;
int a;
cin>>a;
long long k = a;
while(n--){
    cin>>a;
    if(k < a){
       k = a;
    }
}
cout << k << '\n';

}

int main() {

ios_base::sync_with_stdio(false);
cin.tie(NULL), cout.tie(NULL);

solve();
//int t; cin>>t; while(t--){solve();}
return 0;

}