Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
94475 黄枳润 数组中元素交换 C++ Wrong Answer 1 MS 272 KB 326 2024-10-21 19:57:40

Tests(1/10):


Code:

#include<iostream> using namespace std; int main(){ int n,j; cin>>n; int a[n]; for(int i=0;i<=n-1;i++){ cin>>a[i]; } for(int i=1;i<=n-1;i+=2){ j=a[i-1]; a[i-1]=a[i]; a[i]=j; } for(int i=0;i<=n-1;i++){ cout<<a[i]; } return 0; }


Run Info:

------Input------
5 81 43 69 80 80
------Answer-----
43 81 80 69 80
------Your output-----
4381806980