Created
June 30, 2017 14:13
-
-
Save IKKO-Ohta/92b2ac90a79c4ad4e2012e8763552596 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = int(input()) | |
cards = ["1","2","3","4","5","6"] | |
N = N % 120 | |
for i in range(N): | |
a = i % 5 + 1 | |
b = i % 5 + 2 | |
cards[a-1],cards[b-1] = cards[b-1],cards[a-1] | |
print("".join(cards)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment