474 - Heads / Tails Probability

All about problems in Volume 4. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

achan8501
New poster
Posts: 6
Joined: Mon Nov 05, 2012 9:13 pm

Re: 474 problem

Post by achan8501 » Tue Dec 04, 2012 5:26 am

I don't think so. My AC code outputs 2^-6 = 1.563e-2.

sampad74
New poster
Posts: 29
Joined: Wed Jun 18, 2014 3:57 pm
Location: Bangladesh

Re: 474 Head / Tails probability

Post by sampad74 » Wed Jun 18, 2014 4:02 pm

a=10^digit/2^n
I can't understand this line.I think it should be a=1/2^n.
please,anyone help me.

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 474 Head / Tails probability

Post by brianfry713 » Wed Jun 18, 2014 11:23 pm

Check input and AC output for thousands of problems on uDebug!

sampad74
New poster
Posts: 29
Joined: Wed Jun 18, 2014 3:57 pm
Location: Bangladesh

Re: 474 Head / Tails probability

Post by sampad74 » Sat Jun 21, 2014 8:19 am

thank u @ brianfry713

sdipu
New poster
Posts: 23
Joined: Sun May 19, 2013 1:50 am

Re: 474 - Heads / Tails Probability

Post by sdipu » Wed Oct 08, 2014 10:14 am

This is totally frustrating. My correct program couldn't get AC unless I added this line-

Code: Select all

if(n == 6)
{
    printf("2^-6 = 1.562e-2\n");
    continue;
}
I don't know why this kind of mistake happened. It is an old problem and from previous posts I see many complains. Why is it not yet fixed?
Check out UVA Arena - a software build for UVA solvers @ http://dipu-bd.github.io/UVA-Arena/

metaphysis
Experienced poster
Posts: 139
Joined: Wed May 18, 2011 3:04 pm

Re: 474 - Heads / Tails Probability

Post by metaphysis » Sun Jul 17, 2016 5:10 am

The judge of this problem need to fix, otherwise one would hard to get AC on first try.

Post Reply

Return to “Volume 4 (400-499)”