Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create strike-or-spare.cpp #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mahakporwal02
Copy link
Contributor

Chef plans to include a safety feature in the PINs: if someone inputs the reverse of their own PIN in an ATM machine, the Crime Investigation Department (CID) are immediately informed and stop the robbery. However, even though this was implemented by Chef, some people could still continue to get robbed. The reason is that CID is only informed if the reverse of a PIN is different from that PIN (so that there wouldn't be false reports of robberies).

You know that a PIN consists of N decimal digits. Find the probability that Reziba could get robbed. Specifically, it can be proven that this probability can be written as a fraction P/Q, where P≥0 and Q>0 are coprime integers; you should compute P and Q.

Chef plans to include a safety feature in the PINs: if someone inputs the reverse of their own PIN in an ATM machine, the Crime Investigation Department (CID) are immediately informed and stop the robbery. However, even though this was implemented by Chef, some people could still continue to get robbed. The reason is that CID is only informed if the reverse of a PIN is different from that PIN (so that there wouldn't be false reports of robberies).

You know that a PIN consists of N decimal digits. Find the probability that Reziba could get robbed. Specifically, it can be proven that this probability can be written as a fraction P/Q, where P≥0 and Q>0 are coprime integers; you should compute P and Q.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant