题目地址:
1 #include2 3 int n; 4 int m; 5 int num[105]; 6 int i; 7 int count = 0; 8 int main() 9 {10 scanf("%d%d", &n, &m);11 m = n - m % n;12 for( i = 0; i < n; ++i )13 {14 scanf( "%d", &num[i] ); 15 }16 for( i = m; i < n; ++i )17 {18 printf("%d", num[i]);19 ++count;20 if( count != n )21 {22 printf(" ");23 } 24 }25 for( i = 0; i < m; ++i )26 {27 printf("%d", num[i]);28 ++count;29 if( count != n )30 {31 printf(" ");32 }33 }34 printf("\n"); 35 }