P19826 [GeeksforGeeks] Xor cipher3009
普及-
题目描述

Given a string S created by a cypher algorithm. Find the original hexadecimal string.
The cypher algorithm: A hexadecimal string is XORed, N number of times, where N is the string length and every XOR operation is done after shifting the consecutive string to the right.
For example : String: "abcd".

Example 1:
Input:
S = A1D0A1D
Output:
ABCD
Explanation:
Look at the matrix given in the problem statement.
Example 2:
Input:
S = 653CABEBD24
Output:
556F64
Explanation:
556F64
556F64
556F64
556F64
556F64
556F64
653CABEBD24
Your Task:
You don't need to read input or print anything. Your task is to complete the function deCypher() which takes the string S as input parameter and returns the original hexadecimal string.
Note: Alphabets are in uppercase.
Expected Time Complexity: O(N)
Expected Space Complexity: O(N)

Constraints:
1<=N<=1001 & N%2=1

输入格式

见题面

输出格式

见题面

样例输入
S = A1D0A1D
样例输出
ABCD