Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //100/100
- //Memory: 1.76 MB Time : 0.388 s
- #include <iostream>
- #define DNA_LENGTH 6
- #define DOT 46
- using namespace std;
- int main()
- {
- char ch, result[DNA_LENGTH]{ 0 };
- size_t currIndex = 0;
- while ((ch = getchar()) != DOT)
- {
- result[currIndex++] ^= ch;
- if (currIndex == DNA_LENGTH - 1)
- currIndex = 0;
- }
- cout << result << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement