Gerk


私信TA

用户名:xbyyb2014

访问量:1621

签 名:

等  级
排  名 401
经  验 4984
参赛次数 1
文章发表 15
年  龄 0
在职情况 学生
学  校 北京邮电大学
专  业

  自我简介:

解题思路: A变T, C变G

注意事项:

参考代码:

#include <iostream>
// #include <sstream>
// #include <cstdio>
// #include <algorithm>
// #include <cmath>
// #include <cstdlib>
// #include <cstring>
// #include <cctype>
// #include <string>
// #include <climits>
// #include <map>
// #include <vector>
// #include <list>
// #include <set>
using namespace std;
// const int maxn = 40004;
// const long long MOD = 100000007;
// const double PI = acos(-1.0);

int main() {
    string s;
    cin >> s;

    for (auto it = s.begin(); it != s.end(); it++) {
        if (*it == 'A' || *it == 'T')
            cout << (char)('A'+'T'-*it);
        else
            cout << (char)('C'+'G'-*it);
    }

    return 0;
}


 

0.0分

0 人评分

  评论区