125242024-12-21 14:59:16PappMatyasDNS szakaszok száma (75 pont)cpp17Wrong answer 68/758ms508 KiB
#include <iostream>

using namespace std;

int main()
{
    int n, an = 0, ae = 0, ans = 0;
    cin >> n;
    char c;
    for(int i = 0; i < n; i++)
    {
        cin >> c;
        if(c == 'A')
        {
            an++;
        }
        else if(c == 'G')
        {
            ae = an;
        }
        else if(c == 'T')
        {
            ans+=ae;
        }
    }
    cout << ans;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base68/75
1Accepted0/01ms320 KiB
2Accepted0/08ms320 KiB
3Accepted3/31ms320 KiB
4Accepted4/41ms320 KiB
5Accepted4/41ms508 KiB
6Accepted4/41ms320 KiB
7Accepted4/41ms320 KiB
8Accepted3/31ms500 KiB
9Accepted3/31ms320 KiB
10Accepted4/41ms320 KiB
11Accepted4/41ms332 KiB
12Accepted4/41ms320 KiB
13Accepted4/41ms320 KiB
14Accepted4/41ms320 KiB
15Accepted3/38ms508 KiB
16Accepted4/48ms404 KiB
17Accepted4/47ms400 KiB
18Accepted4/47ms320 KiB
19Accepted4/47ms400 KiB
20Accepted4/47ms404 KiB
21Wrong answer0/37ms400 KiB
22Wrong answer0/47ms320 KiB