Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
3868 顾郁铭 奇偶位互换 C++ Wrong Answer 0 0 MS 260 KB 317 2019-12-24 23:40:42

Tests(0/1):


#include<iostream> using namespace std; int main(){ char a[1001],b[1001]; int n,i=0,j=0,k=0; string c; cin>>n; while(k<n){ scanf("%s",a); while(a[i]!='\0'){ char b; b=a[i]; a[i]=a[i+1]; a[i+1]=b; i+=2; } i=0; ++k; printf("%s",a); } // printf("%s",b); return 0; }


Judgement Protocol: