Mean of a Small Sample
Fernbrook Clinic is preparing its quarterly service report, and one line on it is the typical wait for a walk-in appointment. Nobody times every patient - the front desk picks one morning a quarter and records how long each walk-in patient waited before being seen. Those waits, in minutes, are the whole of the evidence.
The clinic knows the recorded morning is a sample and not the full picture; the report is meant to say what a typical wait looks like, based on what was actually measured. A different morning is sampled every quarter and it never has the same number of patients in it.
Task: Print the sample mean of the recorded waits, in minutes, using every value exactly as recorded. Print the raw number - no rounding is asked for.
Input
One line holding the recorded waits in whole minutes, separated by single spaces, in the order the patients arrived. There is at least one.
Output
One line holding the sample mean as a float, printed raw - 43.375, and 41.57142857142857 when the division does not terminate.
Example:
Input:
23 45 12 67 34 89 21 56
Output:
43.375
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in