Create 1371.cpp

This commit is contained in:
Kirigaya Kazuto 2016-05-23 12:44:59 +08:00
parent f0da649615
commit 6d98e3d42c

25
QUSTOJ/1371.cpp Normal file
View File

@ -0,0 +1,25 @@
#include <cstdio>
const int MAXN = 1024;
int p[MAXN];
int main()
{
int n;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d",&p[i]);
}
int m;
scanf("%d",&m);
m=m%n;
for(int i=n-m;i<n;i++)
{
printf("%d ",p[i]);
}
for(int i=0;i<n-m;i++)
{
printf("%d ",p[i]);
}
printf("\n");
return 0;
}