Skip to content

Instantly share code, notes, and snippets.

@IKKO-Ohta
Created June 30, 2017 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IKKO-Ohta/92b2ac90a79c4ad4e2012e8763552596 to your computer and use it in GitHub Desktop.
Save IKKO-Ohta/92b2ac90a79c4ad4e2012e8763552596 to your computer and use it in GitHub Desktop.
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