ChallengeMediumInclusion–Exclusion, Derangements & Pigeonhole
Inclusion--Exclusion, Derangements & Pigeonhole · Medium problem
How many permutations of have exactly two values fixed (i.e. exactly two indices with the -th entry equal to )?
How many permutations of have exactly two values fixed (i.e. exactly two indices with the -th entry equal to )?