Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
88215 张曦 数组中元素交换 C++ Wrong Answer 1 MS 272 KB 393 2024-08-18 16:13:23

Tests(0/10):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int a,c; cin>>a; int b[a]; for(int i = 0;i <= a-1;i++) cin>>b[i]; for(int i = 0;i <= a/2;i+=2) { c = b[i]; b[i] = b[i+1]; b[i+1] = c; } for(int i = 0;i <= a-1;i++) cout<<b[i]<<' '; return 0; }


Run Info:

------Input------
1 49
------Answer-----
49
------Your output-----
32764