Skip to content

Instantly share code, notes, and snippets.

@tkellogg
Created January 3, 2025 13:53
Show Gist options
  • Save tkellogg/9dd558a7c0078f239ff20857fe5507af to your computer and use it in GitHub Desktop.
Save tkellogg/9dd558a7c0078f239ff20857fe5507af to your computer and use it in GitHub Desktop.

in a room of 100 people, 99% are left handed. How many left handed people have to leave the room in order to bring that percentage down to 98%?

To solve this problem, let's break it down step by step.

Initial Number of Left-Handed People:
    Total people in the room = 100
    Percentage of left-handed people = 99%
    Number of left-handed people = 99% of 100 = 0.99 * 100 = 99

Goal:
    We want to reduce the percentage of left-handed people to 98% by having some of them leave the room.

Let's Assume:
    x left-handed people leave the room.

After Leaving:
    Total number of people left in the room = 100 - x
    Number of left-handed people left = 99 - x

Condition for 98% Left-Handed People:
    The ratio of left-handed people to the total number of people after x leave should be 98% or 0.98.
    So, (99 - x) / (100 - x) = 0.98

Solving for x:
    99 - x = 0.98 * (100 - x)
    99 - x = 98 - 0.98x
    Moving terms around: 99 - 98 = 0.98x - x
    1 = 0.98x - x
    1 = -0.02x
    x = -1 / -0.02
    x = 50

So, 50 left-handed people need to leave the room to bring the percentage of left-handed people down to 98%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment