Please do it in c++ as soon as possible. Small boy Bubbles likes going through hours before his PC playing PC games. His #1 game is Bubble Strike, fast air pocket shooting web game for two players. Each game is set in one of the N maps, each having assorted scene arrangement. First time of each game chooses which map the game will be played. The game system subjectively picks three aides and shows them to the players. Each player should pick

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Please do it in c++ as soon as possible.

Small boy Bubbles likes going through hours before his PC playing PC games. His #1 game is Bubble Strike, fast air pocket shooting web game for two players. Each game is set in one of the N maps, each having assorted scene arrangement. First time of each game chooses which map the game will be played. The game system subjectively picks three aides and shows them to the players. Each player should pick one of those three advisers for be discarded. The game system then, self-assertively picks one of the aides that were not picked by any of the players and starts the game. 

He is significantly enthusiastic concerning the game and needs to contribute some energy focusing on maps, thusly growing freedoms to rule matches played on those aides. Regardless, he in like manner needs to finish his work, so he doesn't have the chance to focus on all of the aides. That is simply the explanation he asked the going with request: "What is the base number of guides I need to ponder, so the probability to play one of those aides is basically P"? 

Would you have the option to help Johnny with finding the reaction for this request? You can acknowledge that Johnny's enemies don't have any associate with him, and they will indiscriminately pick maps. 

Information: The essential line contains two entire numbers N (3 ≤ N ≤ 103) and P (0 ≤ P ≤ 1) – complete number of guides in the game and probability to play map Johnny has thought of. P will have everything thought about four digits after the decimal point. 

Output:Yield contains one entire number – least number of guides Johnny needs to examine

Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education