Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3000ye opened this issue Jul 13, 2022 · 0 comments
Open

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

3000ye opened this issue Jul 13, 2022 · 0 comments

Comments

@3000ye
Copy link

3000ye commented Jul 13, 2022

虽然比仓库里的代码要多几行,但是更加符合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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant