|
|
вернуться в форумWA case 6 #include <iostream> #include <cmath> #include <fstream> #include <sstream> using namespace std; int main(){ int n; int m; cin >> n; cin >> m; //double md=6.6; double votes[10001]; for(int i=0;i<m;i++){ int k; cin >> k; votes[k-1]++;
} for(int i=0;i<n;i++){ double chance = (double)votes[i]*100/m; printf("%2.2f",chance); cout << "%" << endl; } } why do i have WA on case 6? I'm stuck Re: WA case 6 before using array add these lines: for(int i=0; i<n; i++) votes[i] = 0 |
|
|