Advertisement
Guest User

Untitled

a guest
Oct 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. #include <vector>
  2. #include <algorithm>
  3. #include <fstream>
  4. #include<string>
  5. #include <iostream>
  6. #include <map>
  7. # include <set>
  8. #include<cmath>
  9. #include <numeric>
  10. using namespace std;
  11.  
  12. long long int const q = 1e15;
  13. vector<char> r;
  14.  
  15. const long long mod = 998244353;
  16.  
  17. long long  int gcd(long long int a,long long int b)
  18. {
  19.     if (b == 0) return a;
  20.     a %= b;
  21.     return gcd(b, a);
  22. }
  23.  
  24. int main() {
  25.     int n;
  26.     cin >> n;
  27.     string s;
  28.     cin >> s;
  29.     int num1 = 0;
  30.     int num2 = 0;
  31.     for (int i = 0; i < s.size(); i++) {
  32.         if (s[i] == 'T') num1++;
  33.         if (s[i] == 'U') num2++;
  34.  
  35.     }
  36.     if (num1 == 0 && num2 == 0) cout << "BOTH";
  37.     else if (num1 == 0) cout << "RNA";
  38.     else if (num2 == 0) cout << "DNA";
  39.     else cout << "NONE";
  40.     cin >> num1;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement