0—4 所能组成的无重复的5位数中奇数的个数。无重复的5位数是指0-4仅能出现一次
from itertools import permutations
d=permutations(range(5),5)
m=0
n=0
for t in d:
if t[0]==0:continue
x=int(''.join([str(y) for y in t]))
m+=1
if x%2!=0:
n+=1
print(f'total numbers: {m}, average: {n}')