10169 - Urn-ball Probabilities !
Moderator: Board moderators
-
- New poster
- Posts: 1
- Joined: Sat Oct 13, 2001 2:00 am
10169 - Urn-ball Probabilities !
To admins: can you please help me and tell me a test where my program fails? Or only some big test?
Test Cases needed
Hi...
Can anybody give me few test cases ? I need to check the outputs with mine.
Thankx in advance..
Can anybody give me few test cases ? I need to check the outputs with mine.
Thankx in advance..
-
- New poster
- Posts: 5
- Joined: Thu Nov 25, 2004 12:56 am
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.
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)
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;
}
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;
}
I need help too. Could someone verify my io test ?
Input:
Output:
Thanks in advance.
Input:
Code: Select all
10
100
1000
10000
100000
999999
Code: Select all
0.675050 14
0.700373 317
0.703028 5138
0.703295 71322
0.703315 913151
0.700368 11131411
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
Hi there, can you send me your code for this problem
Your code only takes one case.The input file contains several lines of inputs.
Ouput exactly what is specified. And don't output what is not specified.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.