Skip to content

Instantly share code, notes, and snippets.

@enzerr
Created May 17, 2023 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enzerr/2032696be611dfe5f56ef7f2ab574bb2 to your computer and use it in GitHub Desktop.
Save enzerr/2032696be611dfe5f56ef7f2ab574bb2 to your computer and use it in GitHub Desktop.
#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 5;
int v[maxn];
int main(){
int n; cin >> n;
int conserta=0, substitui=0;
for(int i = 0; i < n; i++){
cin >> v[i];
if(v[i]<50) substitui++;
else if(v[i]<85) conserta++;
}
cout << substitui << " " << conserta << '\n';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment