#include<stdio.h> #include<string.h> int main(){ int state = 0; int i = 0; int n = 0; int m = 0; state = scanf("%d", &n); int* p= (int*)malloc(sizeof(int) * n); while(i<n){ state = scanf("%d", &p[i]); /* printf("%d ", p[i]);*/ i++; } state = scanf("%d", &m); int *p1= (int*)malloc(sizeof(int) * n); int k = 0; for(int i = 0; i < n; i++){ k = (i + m) % n; p1[k] = p[i]; } for(int i = 0; i < n; i++){ printf("%d ", p1[i]); } free(p); free(p1); p = NULL; p1 = NULL; return 0; }
0.0分
0 人评分