Problem 48 of 50

Easy

lightbulb What to do

You have a stack of cards with numbers on them. You need to take a certain number of cards from the bottom and place them on top of the stack, then show the new order of the cards from top to bottom.

Key Concepts
arrays/lists slicing input/output basic list manipulation
Examples

Input: 5 3 1 2 3 4 5

Output: 3 4 5 1 2

Input: 6 2 1 2 1 2 1 2

Output: 1 2 1 2 1 2

code Python Editor
Loading Python...
Test Results
tips_and_updates Tips for Beginners
  • Focus on understanding the logic, not memorizing syntax
  • Use print statements to debug your code
  • Don't worry about input parsing - the function handles that for you
  • If stuck, try writing out your solution on paper first