Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
2.0 kB
1
Indexable
Never
#include <iostream>
#include <string>
using namespace std;
int main()
{
    /*
    string str;
    std::getline(cin, str);
    int h = 0;
    int u = 0;
    while (h < str.size()) {
        if (str[h] == 32) {
            u++;
        }
        h++;
    }
    cout << u;
    //
    //
    string str;
    cin >> str;
    if (str.size() == 6)
    {
        if (str[0] == 'A' or str[0] == 'B' or str[0] == 'C' or str[0] == 'E' or str[0] == 'H' or str[0] == 'K' or str[0] == 'M' or str[0] == 'O' or str[0] == 'P' or str[0] == 'T' or str[0] == 'X' or str[0] == 'Y')
        {
            if (str[1] == '1' or str[1] == '2' or str[1] == '3' or str[1] == '4' or str[1] == '5' or str[1] == '6' or str[1] == '7' or str[1] == '8' or str[1] == '9' or str[1] == '0')
            {
                if (str[2] == '1' or str[2] == '2' or str[2] == '3' or str[2] == '4' or str[2] == '5' or str[2] == '6' or str[2] == '7' or str[2] == '8' or str[2] == '9' or str[2] == '0')
                {
                    if (str[3] == '1' or str[3] == '2' or str[3] == '3' or str[3] == '4' or str[3] == '5' or str[3] == '6' or str[3] == '7' or str[3] == '8' or str[3] == '9' or str[3] == '0')
                    {
                        if (str[4] == 'A' or str[4] == 'B' or str[4] == 'C' or str[4] == 'E' or str[4] == 'H' or str[4] == 'K' or str[4] == 'M' or str[4] == 'O' or str[4] == 'P' or str[4] == 'T' or str[4] == 'X' or str[4] == 'Y')
                        {
                            if (str[5] == 'A' or str[5] == 'B' or str[5] == 'C' or str[5] == 'E' or str[5] == 'H' or str[5] == 'K' or str[5] == 'M' or str[5] == 'O' or str[5] == 'P' or str[5] == 'T' or str[5] == 'X' or str[5] == 'Y')
                            {
                                cout << "YES";
                                return 0;
                            }
                        }
                    }
                }
            }
        }
    }
    cout << "NO";
    return 0;
}
Leave a Comment