do it in c++ as soon as possible. Skip if you don't know.   Little Johnny Bubbles appreciates going through hours before his PC playing computer games. His #1 game is Bubble Strike, speedy air pocket shooting internet game for two players.  Each game is set in one of the N maps, each having diverse landscape setup. First period of each game settles on which map the

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Please do it in c++ as soon as possible. Skip if you don't know.

 

Little Johnny Bubbles appreciates going through hours before his PC playing computer games. His #1 game is Bubble Strike, speedy air pocket shooting internet game for two players. 

Each game is set in one of the N maps, each having diverse landscape setup. First period of each game settles on which map the game will be played. The game framework arbitrarily chooses three guides and shows them to the players. Every player should pick one of those three guides to be disposed of. The game framework then, at that point, arbitrarily chooses one of the guides that were not picked by any of the players and starts the game. 

Johnny is profoundly energetic with regards to the game and needs to invest some energy concentrating on maps, in this manner expanding opportunities to dominate matches played on those guides. Nonetheless, he likewise needs to get his work done, so he doesn't have the opportunity to concentrate on every one of the guides. That is the reason he asked himself the accompanying inquiry: "What is the base number of guides I need to contemplate, so the likelihood to play one of those guides is essentially P"? Would you be able to assist Johnny with discovering the response for this inquiry? You can accept that Johnny's adversaries don't have any acquaintance with him, and they will haphazardly pick maps. 

Input: The primary line contains two whole numbers N (3 ≤ N ≤ 103) and P (0 ≤ P ≤ 1) – complete number of guides in the game and likelihood to play map Johnny has considered. P will have all things considered four digits after the decimal point. 

Output:Yield contains one whole number – least number of guides Johnny needs to contemplate.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY