to be done
Last active
February 12, 2024 20:15
-
-
Save Parihsz/82c658050b66361982240b7d12c93fe0 to your computer and use it in GitHub Desktop.
comp programming common libraries
n items from a collection of m
complicated, not often used in comp programming
permutations without internal ordering
a, a number of collections, the ways to choose one from each
one vegetable, one meat, one starch ....
b, one collection, repeated n times, each choosing from the collection
digits building numbers or letters building words/sentences
"""
The number of ways to have 3 sorted numbers
between 1 inclusive and X (number of fourth player) exclusive
"""
import itertools
X = int(input())
results = itertools.combinations(range(X - 1), 3)
print(len(results))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment