Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
101560 | 饶晋吉 | 数组中元素交换 | C++ | Wrong Answer | 1 MS | 264 KB | 214 | 2024-12-15 14:23:54 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,t; cin>>n; int a[n]; for(int i=0;i<=n-1;i++){ cin>>a[i]; } for(int i=0;i<n-1;i=i+2){ t=a[i]; a[i]=a[i+1]; a[i+1]=t; } return 0; }
------Input------
1 49
------Answer-----
49
------Your output-----