Skip to content

Instantly share code, notes, and snippets.

@puffy
Created April 24, 2019 10:00
Show Gist options
  • Save puffy/c66a4d5078f4e9a62f2caa5e0c9b6e86 to your computer and use it in GitHub Desktop.
Save puffy/c66a4d5078f4e9a62f2caa5e0c9b6e86 to your computer and use it in GitHub Desktop.
def distributed_number(num)
k = 9 # number of distributed groups
start = 216000
stop = 1521368
total = stop - start
((total / k) * (num % k) + num / k) + start - start / k
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment