Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
101505 江婉儿 数组元素前移 C++ 通过 100 0 MS 260 KB 356 2023-09-09 09:55:20

Tests(5/5):


#include<cstdio> #include<iostream> using namespace std; int main() { //freopen("forward.in","r",stdin); //freopen("forward.out","w",stdout); int n,a[10000]; cin>>n; for(int b=1;b<=n;b++) { cin>>a[b]; } a[n+1]=a[1]; for(int c=2;c<=n+1;c++) { a[c-1]=a[c]; } for(int d=1;d<=n;d++) { cout<<a[d]<<endl; } return 0; }


测评信息: