Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- problema 346
- #include <iostream>
- using namespace std;
- int main()
- {
- long long n,a,c=0,d,mx=0;
- cin>>n;
- while (n!=0){
- cin>>a;
- if (a>mx){
- mx=a;
- c=0;
- }
- if (a==mx)
- c++;
- n--;
- }
- cout<<mx<<" "<<c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement