The Churn Number
Lantern's board watches the leak in the bucket as closely as the tap. Two numbers arrive each month: how many subscribers were on the books on the first, and how many of those had gone by the last. Anyone who joined during the month is excluded from both figures, so the two describe exactly the same group of people.
Task: Print the percentage of the starting subscribers who left during the month.
Input
Two lines, both integers. The first is the number of subscribers at the start of the month, never zero. The second is how many of them left.
Output
One line: a percentage with exactly one digit after the decimal point. A month with no departures prints 0.0.
Example:
Input:
400
22
Output:
5.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