GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  • Tutorials
  • 10 Days of Statistics
  • Problem
  • Submissions
  • Leaderboard
  • Discussions
  • Editorial
  • Tutorial

This view

  • Original page
  • New address

GeezerVison is showing www.hackerrank.com — Day 4: Geometric Distribution I | HackerRank

We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

Objective
In this challenge, we learn about geometric distributions. Check out the Tutorial tab for learning materials!

Task
The probability that a machine produces a defective product is . What is the probability that the defect occurs the item produced?

Input Format

The first line contains the respective space-separated numerator and denominator for the probability of a defect, and the second line contains the inspection we want the probability of being the first defect for:

1 3
5

If you do not wish to read this information from stdin, you can hard-code it into your program.

Output Format

Print a single line denoting the answer, rounded to a scale of decimal places (i.e., format).

Author

AvmnuSng

Difficulty

Easy

Max Score

30

Submitted By

26293

Need Help?


View tutorial
View discussions
View editorial
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits

Cookie support is required to access HackerRank

Seems like cookies are disabled on this browser, please enable them to open this website

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.