Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Timus 1263
- #include <iomanip>
- #include <iostream>
- using namespace std;
- int main()
- {
- double n, m, nn[10001], ch=0, answ;
- cin >> n >> m;
- for(int i=0;i<m;i++)
- {
- cin >> nn[i];
- }
- for(int i=1;i<n+1;i++)
- {
- for(int y=0;y<m;y++)
- {
- if(nn[y]==i)
- {
- ch++;
- }
- }
- answ = (100/m)*ch;
- cout << fixed << setprecision(2) << answ << "%" << endl;
- ch = 0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement