Skip to content

Instantly share code, notes, and snippets.

@jasonrhodes
Created July 17, 2019 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonrhodes/498673f059286ca2ac48e7a1a33e5d58 to your computer and use it in GitHub Desktop.
Save jasonrhodes/498673f059286ca2ac48e7a1a33e5d58 to your computer and use it in GitHub Desktop.

Student Fit Problem

T is the number of total students
n is the number of teachers/classes
c is the number of students per class

c = T / n

for every value of n, I want to also compute r, or "the number of students you can add to T to get c to rise to the next whole number"

so for example:

T = 105
n = 10

c = 10.5

in this case, r = 5 (because T + 5 would raise c to 111)

How can you express r as a function of T and n?

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