forked from cognizance-amrita/hacktoberfest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Birthday_cake_candles_#67.cpp
I contributed in cognizance-amrita#67
- Loading branch information
1 parent
895b1e0
commit d954813
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <cmath> | ||
#include <cstdio> | ||
#include <vector> | ||
#include <iostream> | ||
#include <algorithm> | ||
using namespace std; | ||
|
||
|
||
int main() { | ||
int N; cin>>N; | ||
int a[N]; | ||
for(int i=0;i<N;i++) cin>>a[i]; | ||
int biggest = 0; | ||
for(int i=0;i<N;i++) biggest = max(biggest, a[i]); | ||
int count = 0; | ||
for(int i=0;i<N;i++) if (a[i] == biggest) count++; | ||
cout<<count<<endl; | ||
return 0; | ||
} |