set up: a derangement of length is defined as a permutation of the integers where is not in the th position of the string, for all positions . for example: there are 6 permutations of length 3, but only 2 of them are derangements (bold ones): 123, 132, 213, 231, 312, 321 directions: implement the inclusive-exclusion algorithm to count how many derangements of length where are for . input: integer , the length of the derangements (ie: n=3 for the example above) Output: the number of derangements of length
n