assign value as per ratio defined

A simple method is to maintain a count of how many pens each person should get. Then, as long as they are pens to distribute, you give one to the person which should get the most pens.

Here is a work through of your example:

60/13, 60/13, 10/13 -> 1, 0, 0

47/13, 60/13, 10/13 -> 1, 1, 0

47/13, 47/13, 10/13 -> 2, 1, 0

34/13, 47/13, 10/13 -> 2, 2, 0

34/13, 34/13, 10/13 -> 3, 2, 0

21/13, 34/13, 10/13 -> 3, 3, 0

21/13, 21/13, 10/13 -> 4, 3, 0

8/13, 21/13, 10/13 -> 4, 4, 0

8/13, 8/13, 10/13 -> 4, 4, 1

8/13, 8/13, -3/13 -> 5, 4, 1