Skip to content

Instantly share code, notes, and snippets.

@ssirowy
Created January 10, 2014 18:32
Show Gist options
  • Save ssirowy/8359884 to your computer and use it in GitHub Desktop.
Save ssirowy/8359884 to your computer and use it in GitHub Desktop.
ROTW: 1/10/2014
Part A) Farewell
At a train station, the Porter family is saying goodbye to the Robinson family.
We don't know who is leaving and who is staying.
Each of the members of the Porter family say farewell to each of the members of the
Robinson family. To say goodbye, two men shake hands, and both a man and woman and two
women kiss once on the cheek.
An eyewitness to event counted 21 handshakes and 34 kisses. How many men and how many
women were saying goodbye?
***Programming Problem***
Part B) The Dividing End
My ID number is quite remarkable. It's a nine-digit number with each of the digits 1 to 9
appearing once. The whole number is divisible by 9. If you remove the rightmost digit, the
remaining eight-digit number is divisible by 8. Removing the next rightmost digit leaves a
seven-digit number that is divisible by 7. The property continues all the way down to
one digit. What is my ID number?
* Your answer must be accompanied by some code, preferably in your own gist
** CODE GOLF: Extra credit (and I do have a prize) goes to the person who can do this
in the fewest number of lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment