Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(input) {
- let print = input.slice(0, input.length - 1);
- for(let i = 0; i < Number(input[input.length - 1]); i++) {
- print.unshift(print.pop());
- }
- console.log(print.join(" "));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement