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 »

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 »

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 »

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 »

thank u @ brianfry713
sdipu
New poster
Posts: 23
Joined: Sun May 19, 2013 1:50 am

Re: 474 - Heads / Tails Probability

Post by sdipu »

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 »

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)”