3 条题解

  • 0
    @ 2025-9-23 15:01:54

    permutations 搞定

    from itertools import permutations
    n = int(input())
    for i in permutations(range(1, n + 1), n):
        print(*i)
    

    信息

    ID
    552
    时间
    1000ms
    内存
    128MiB
    难度
    5
    标签
    (无)
    递交数
    166
    已通过
    67
    上传者