| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 151641 | Kevin | 奇偶位互换 | C++ | Wrong Answer | 4 MS | 272 KB | 334 | 2026-04-15 23:11:01 |
#include<bits/stdc++.h> using namespace std; char a[60]; int main(){ int c; char a1; cin>>c; for(int i=1;i<=c;i++){ cin>>a+1; int len=strlen(a+1); for(int j=1;j<=len;j++){ if(j%2){ a1=a[j]; a[j]=a[j+1]; a[j+1]=a1; } } for(int j=1;j<=len;j++){ cout<<a[j]; } } return 0; }
------Input------
100 1010001110000111 1000010111 000001011110101001111111001110110111010010111111 10011010010000 1010101011101001000110 100010011101111000100000010110001000001100101111 010100100111100010011011000000000001001011101011 100011010101011010 001100011101001111010111001000010010011001100001 011111100011011100010011101011110010 0000100110 111010011001100001100111 001010111000001011000100010011100011011111000111 111101101000010000111111 1100000000110110101100001101 11010111011101 0010001111 1001011101 00
------Answer-----
0101001101001011 0100101011 000010101101010110111111001101111011100001111111 01100101100000 0101010111010110001001 010001101110110100010000101001000100001100011111 101000011011010001100111000000000010000111010111 010011101010100101 001100101110001111101011000100100001100110010010 101111010011101100100011010111110001 0000011001 110101100110010010011011 000101110100000111001000100011010011101111001011 111110010100100000111111 1100000000111001011100001110 11101011101110 0001001111 0110101110 000101
------Your output-----
01010011010010110100101011000010101101010110111111001101111011100001111111011001011000000101010111010110001001010001101110110100010000101001000100001100011111101000011011010001100111000000000010000111010111010011101010100101001100101110001111101011000100100001100110010010101111010011101100100011010111110001000001100111010110011001001001101100010111010000011100100010001101001110111100101111111001010010000011111111000000001110010111000011101110101110111000010011110110101110000101111011001100110101