Anonymous user
Fairshare between two and more: Difference between revisions
→{{header|Python}}: Update to 11
(Change test to eleven people invalidates all examples so far, but emphasises use case of sharing fairly when b>10.) |
(→{{header|Python}}: Update to 11) |
||
Line 72:
if __name__ == '__main__':
for b in (2, 3, 5,
print(f"{b:>2}: {str(list(islice(fairshare(b), 25)))[1:-1]}")</lang>
Line 79:
3: 0, 1, 2, 1, 2, 0, 2, 0, 1, 1, 2, 0, 2, 0, 1, 0, 1, 2, 2, 0, 1, 0, 1, 2, 1
5: 0, 1, 2, 3, 4, 1, 2, 3, 4, 0, 2, 3, 4, 0, 1, 3, 4, 0, 1, 2, 4, 0, 1, 2, 3
=={{header|Sidef}}==
|