1008 数组元素循环右移问题 (20 分)
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n,m;//N个数,右移M位 n = sc.nextInt(); m = sc.nextInt(); int[] arr = new int[n]; for(int i=m%n; i<n; i++){ arr[i] = sc.nextInt(); } for(int i=0; i<m%n; i++){ arr[i] = sc.nextInt(); } for(int i=0; i<n-1; i++){ System.out.print(arr[i] + " "); } System.out.print(arr[n-1]); } }