Skip to content

提供乙级1008 python版本的PythonIC风格代码 #166

@3000ye

Description

@3000ye

虽然比仓库里的代码要多几行,但是更加符合PythonIC风格规范

#!/usr/bin/python3.8
# Author: ye_3000
# Created Time: 2022-07-06


n, m = list(map(int, input().split()))
ls = list(input().split())


m %= n
ls[:] = ls[:: -1]
ls[:m] = ls[:m][:: -1]
ls[m:] = ls[m:][:: -1]

print(" ".join(ls))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions