ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1049. Brave Balloonists

How you think, from what attempt it is possible to get AC?
Posted by RuslanNiger 25 Mar 2010 12:28
How you think, from what attempt it is possible to get AC?

cout<<rand()%10;
Re: How you think, from what attempt it is possible to get AC?
Posted by dAFTc0d3r [Yaroslavl SU] 25 Mar 2010 16:31
Seems that probability of AC is (1/10) ^ k where k is number of tests.
So probability to get just one AC after N attempts is 1 - ( 1 - (1/10) ^ k ) ^ N
^_^
Good luck. ;)

P.S.: if k = 10, you have to make 6931471806 attempts for making this probability greater then 0.5 xD
P.P.S: ...if i made no mistakes. ;)