• [A] Alex's string

  • 时间限制: 2000 ms 内存限制: 65535 K
  • 问题描述
  • Alex has a string S(the first character of S is S0, the second is S1 and so on) but the string is normal. As we all know, Alex is a naughty boy, now he wants to change the string, we know the length of S is n and n is an even number, now he wants to swap (S0, S1), (S2, S3), ..., (Sn-1, Sn), please tell him the string after swaping.
  • 输入
  • For each test case, first line contains a string S(1 <= |S| <= 100000, and |S| is an even number), and you can assume that S just contains '0'-'9' and 'a'-'z'.
  • 输出
  • For each test case, print the string after swaping.
  • 样例输入
  • abcd1234
    bntucicp
  • 样例输出
  • badc2143
    nbuticpc
  • 提示
  • For the first sample, we swap (a, b) (c, d) (1, 2) (3, 4), then we can get string "badc2143".
  • 来源
  • 本站或者转载
  • 操作

显示春菜