Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def countDown(n):
- if n % 3:
- return "-1"
- res = [str(i) for i in range(n, 0, -1)]
- for i in range(3, n, 3):
- res[i], res[i + 2] = res[i + 2], res[i]
- return ''.join(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement