Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
6570 顾郁铭 奇偶位互换 C++ 通过 100 0 MS 256 KB 233 2020-10-06 20:25:30

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int n,l; string s; int main(){ cin>>n; for(int i=0;i<n;i++){ cin>>s; l=s.length(); for(int j=0;j<l;j+=2){ swap(s[j],s[j+1]); } cout<<s<<endl; } return 0; }


测评信息: