Page 1 of 1

10169 - Urn-ball Probabilities !

Posted: Sat Oct 13, 2001 9:16 pm
by lalesculiviu
To admins: can you please help me and tell me a test where my program fails? Or only some big test?

Posted: Thu Oct 18, 2001 2:49 pm
by Carlos
Sorry, the judge's output was wrong. It will be fixed soon.

Test Cases needed

Posted: Thu Aug 22, 2002 6:23 am
by chang
Hi...

Can anybody give me few test cases ? I need to check the outputs with mine.

Thankx in advance..

Posted: Mon Aug 15, 2005 11:08 pm
by Christophoros
is the the judge's output fixed ?

The problem seems very easy. I checked all my solutions with Mathematica and they are exactly the same. I can not understand how it comes WA.
I assumed that the input '0' is not legal. If it is this my mistake, what should be the output?

Thx in advance for any reply.

10169 - I need Help plzzz (Need code)

Posted: Fri Mar 02, 2007 9:14 pm
by mimran
I tried it lot of times and i m unable to solve it, here is my code:
void main(void)
{
int n;
cout<<"How many times you pick up ?";
cin>>n;
long double result=1;
double turn=1.0;
for (int i=1;i<=n;i++)
{
result=result * ( (1/turn) * (1/(turn+1)) );
turn++;

}

cout<<result<<endl;

}

Posted: Sat Mar 03, 2007 6:46 am
by rio
I need help too. Could someone verify my io test ?
Input:

Code: Select all

10
100
1000
10000
100000
999999
Output:

Code: Select all

0.675050 14
0.700373 317
0.703028 5138
0.703295 71322
0.703315 913151
0.700368 11131411
Thanks in advance.

Posted: Sat Mar 03, 2007 12:39 pm
by rio
Found bug and got AC. The output of previous input should be:

Code: Select all

0.675050 14
0.700373 317
0.703028 5138
0.703295 71322
0.703322 913151
0.703325 11131411

Hi rio send me your code plz

Posted: Sat Mar 03, 2007 9:00 pm
by mimran
Hi there, can you send me your code for this problem

Posted: Sun Mar 04, 2007 11:38 am
by rio
The input file contains several lines of inputs.
Your code only takes one case.
For each line of input print a single line of output containing a floating point number and an integer. The floating-point number indicates the probability that you have picked up two red balls in at least one of your pick-ups and the second integer denotes how many consecutive zeros are there after decimal point in the probability value that all of your pick ups has both balls as red.
Ouput exactly what is specified. And don't output what is not specified.

Posted: Thu Mar 08, 2007 3:44 pm
by mimran
(Thanks rio ) I tried your input values, now i got write answer, but how to break exponential numbers in normal numbers and how to get number of zeroes after decimal point.