# 有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?

def three_number():
    ll = [1, 2, 3, 4]
    count = 0
    for a in ll:
        for b in ll:
            for c in ll:
                if (a != b) and (a != c) and (b != c):
                    count += 1
                    print('{}{}{}'.format(a, b, c))
    return count

 

posted on 2020-08-27 17:47  焚音留香  阅读(229)  评论(0编辑  收藏  举报