#include <iostream>
#include <cstdlib>
#include <ctime>
#include <windows.h>
#include <conio.h>
#include <iomanip>
#include <iostream>
using namespace std;
char ch;
int count=0;
int main()
{
srand(time(0));
int a[10];
for (int j=0;j<10;j++)
a[j]=1;
do
{
Sleep(.00000005);
system("cls");
int i=rand()%10;
a[i]++;
count++;
for( int j=0;j<10;j++) cout<<setw(2)<<j<<": "
<<setiosflags(ios::left)<<setw(3)<<setiosflags(ios::showpoint)<<setprecision(3)
<<((float)count/(float)a[j])<<"%"<<endl<<endl;
cout<<count;
}
while (!kbhit());
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0ZGxpYj4KI2luY2x1ZGUgPGN0aW1lPgojaW5jbHVkZSA8d2luZG93cy5oPgojaW5jbHVkZSA8Y29uaW8uaD4KI2luY2x1ZGUgPGlvbWFuaXA+CiNpbmNsdWRlIDxpb3N0cmVhbT4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNoYXIgY2g7CmludCBjb3VudD0wOwppbnQgbWFpbigpCnsKICAgIHNyYW5kKHRpbWUoMCkpOwogICAgaW50IGFbMTBdOwogICAgZm9yIChpbnQgaj0wO2o8MTA7aisrKQogICAgICAgIGFbal09MTsKZG8KewpTbGVlcCguMDAwMDAwMDUpOwpzeXN0ZW0oImNscyIpOwppbnQgaT1yYW5kKCklMTA7CmFbaV0rKzsKY291bnQrKzsKZm9yKCBpbnQgaj0wO2o8MTA7aisrKSBjb3V0PDxzZXR3KDIpPDxqPDwiOiAiCiAgICA8PHNldGlvc2ZsYWdzKGlvczo6bGVmdCk8PHNldHcoMyk8PHNldGlvc2ZsYWdzKGlvczo6c2hvd3BvaW50KTw8c2V0cHJlY2lzaW9uKDMpCiAgICA8PCgoZmxvYXQpY291bnQvKGZsb2F0KWFbal0pPDwiJSI8PGVuZGw8PGVuZGw7CmNvdXQ8PGNvdW50Owp9Cgp3aGlsZSAoIWtiaGl0KCkpOwoKcmV0dXJuIDA7Cn0K