[Solution] DNA Storage CodeChef Solution | CodeChef Problem Solution 2022
For encoding an even-length binary string into a sequence of A
, T
, C
, and G
, we iterate from left to right and replace the characters as follows:
00
is replaced withA
01
is replaced withT
10
is replaced withC
11
is replaced withG
Given a binary string of length ( is even), find the encoded sequence.
Input Format
- First line will contain , number of test cases. Then the test cases follow.
Solution Click Below:- CLICK HERE
- Each test case contains two lines of input.
- First line contains a single integer , the length of the sequence.
- Second line contains binary string of length .
Output Format
For each test case, output in a single line the encoded sequence.
Waiting Time CodeChef Solution
Joining Date CodeChef Solution
Distinct Palindrome CodeChef Solution
The Optimal Pairs CodeChef Solution
Make them Equal CodeChef Solution
Permutation AND CodeChef Solution
Note: Output is case-sensitive.
Constraints
- is even.
- Sum of over all test cases is at most .
- contains only characters
0
and1
No comments:
Post a Comment