1번 문제
정수 배열과 정수 k가 주어지면 모든 원소를 k칸씩 앞으로 옮기시오. Given an array and an integer K, shift all elements in the array K times. input: [1, 2, 3, 4, 5], k = 2 output: [3, 4, 5, 1, 2] input: [0, 1, 2, 3, 4], k = 1 output: [1, 2, 3, 4, 0] import java.util.Scanner; import javax.swing.plaf.synth.SynthScrollBarUI; public class TestCode { public static void main (String args[]){ Scanner sc = new Scanner(System.in); i..
2020. 3. 14.