2 solutions

  • 5
    @ 2024-1-22 11:50:55
    #include<bits/stdc++.h>
    using namespace std;
    string a,b;
    int main(){
    	system("color F1");
    	cin>>a;
    	int t=a.size();
    	for(int i=0;i<t;i++){
    		if(a[i]=='A') b+='T';
    		else if(a[i]=='T') b+='A';
    		else if(a[i]=='G') b+='C';
    		else if(a[i]=='C') b+='G';
    	}
    	cout<<b<<endl;
    	return 0;
    }
    

    嘿兄弟怎么简单的题还来看题解?

    • 2
      @ 2023-12-23 21:24:30
      #include <bits/stdc++.h>
      using namespace std;
      char s[2222222];
      int main(){
      	cin>>s;
      	for(int i=0;i<strlen(s);i++){
      		if (s[i]=='A') cout<<"T";
      		else if (s[i]=='G') cout<<"C";
      		else if (s[i]=='T') cout<<"A";
      		else if (s[i]=='C') cout<<"G";
      	}
      	return 0;
      }
      

      竟然没有题解

      • 1

      Information

      ID
      621
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      3
      Tags
      # Submissions
      20
      Accepted
      20
      Uploaded By