Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Dejwo to ziomal ®© */
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- double tab[200];
- int n;
- int sum()
- {
- double w = 0;
- for(int i=0; i<200; i++)w+=tab[i];
- return round(w/n);
- }
- int main()
- {
- ios_base::sync_with_stdio(0);
- cin>>n;
- for(int i=0; i<n; i++)cin>>tab[i];
- sort(tab, tab+n);
- int index = 0;
- while (sum() < 5)
- {
- // cout<<sum()<<endl;
- tab[index] = 5;
- index++;
- }
- cout<<index<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement