All problems

The Retention Curve Point

mediumPythonAnalytics

Lantern calls everyone who signed up on the same day a cohort, and follows that cohort for a month. On day 30 the growth team pulls the ids of everyone from the batch who is still opening the app, and asks what fraction of the original group is left. Signups look healthy every week; this is the number that says whether they stayed.

Task: Print the percentage of the cohort still active on day 30.

Input

The first line holds an integer: the size of the cohort, never zero. The second line holds an integer m, how many of them were still active. Then come m lines, one user id each. Every id belongs to the cohort and no id appears twice. When m is 0, no id lines follow.

Output

One line: a percentage with exactly one digit after the decimal point. Print 0.0 when nobody came back.

Example:

Input:
200
3
u1
u2
u3

Output:
1.5

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

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…