158622025-03-06 15:09:37rennDNS szakaszok száma (75 pont)cpp17Wrong answer 11/754ms556 KiB
#include <bits/stdc++.h>
using namespace std;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);
    int n;
    cin >> n;

    int a = 0, g = 0, t = 0;
    char c;
    for(int i = 0; i < n; i++)
    {
        cin >> c;
        if(c == 'A') a++;
        if(c == 'G') g += a;
        if(c == 'T') t += g;
    }
    cout << t << endl;
}
SubtaskSumTestVerdictTimeMemory
base11/75
1Wrong answer0/01ms316 KiB
2Wrong answer0/03ms508 KiB
3Accepted3/31ms316 KiB
4Wrong answer0/41ms316 KiB
5Wrong answer0/41ms316 KiB
6Accepted4/41ms544 KiB
7Accepted4/41ms316 KiB
8Wrong answer0/31ms316 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/41ms556 KiB
11Wrong answer0/41ms316 KiB
12Wrong answer0/41ms316 KiB
13Wrong answer0/41ms316 KiB
14Wrong answer0/41ms508 KiB
15Wrong answer0/34ms316 KiB
16Wrong answer0/43ms316 KiB
17Wrong answer0/43ms508 KiB
18Wrong answer0/43ms500 KiB
19Wrong answer0/42ms316 KiB
20Wrong answer0/42ms316 KiB
21Wrong answer0/32ms316 KiB
22Wrong answer0/42ms316 KiB