Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
88246 小徐老师 数组中元素交换 C++ Wrong Answer 1 MS 268 KB 353 2024-08-19 09:32:13

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-----
32766