Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
137590 hjx2115 奇偶位互换 C++ Accepted 6 MS 272 KB 286 2025-11-20 18:00:40

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int i,j,n; char a[50],temp; cin>>n; while (n--) { cin>>a; i=0; j=1; while (i<strlen(a)) { temp=a[i]; a[i]=a[j]; a[j]=temp; i=i+2; j=j+2; } cout<<a<<endl; } return 0; }