|
|
back to boardWR in test #1 Posted by mihran 10 Oct 2007 22:49 // PROGRAM 1263 IN C++ # include <iostream.h> # include <stdio.h> int main() { int N,M,a[10000]; double k,l=0; cin>>N>>M; if (N>=1 && N<=10000 && M>=1 && M<=10000) { for (int i=0;i<=M-1;i++) cin >>a[i]; for (int p=1;p<=N;p++) { for (int h=0;h<=M-1;h++) { if (a[h]==p) l++; } k=(l/M)*100; l=0; printf ("%.2f",k); cout <<'%'<<endl; } } return 0; } Re: WR in test #1 Edited by author 07.10.2012 21:43 Edited by author 07.10.2012 21:44 |
|
|