88482024-02-01 20:03:10körteDNS szakaszok száma (75 pont)python3Time limit exceeded 45/75300ms12520 KiB
N = int(input())
lanc = input()
db = 0

for i in range(N):
    if lanc[i] == "A":
        if not(lanc.count("G", i, N) == 0) and not(lanc.count("T",i, N) == 0):
            for j in range(i, N):
                if lanc[j] == "G":
                    db += lanc.count("T", j, N)
                    break
print(db)
SubtaskSumTestVerdictTimeMemory
base45/75
1Accepted0/018ms11068 KiB
2Time limit exceeded0/0300ms4196 KiB
3Accepted3/317ms11896 KiB
4Accepted4/417ms12172 KiB
5Accepted4/417ms11808 KiB
6Accepted4/417ms12192 KiB
7Accepted4/417ms11912 KiB
8Accepted3/317ms12244 KiB
9Accepted3/317ms12360 KiB
10Accepted4/417ms12372 KiB
11Accepted4/418ms12276 KiB
12Accepted4/417ms12520 KiB
13Accepted4/423ms12464 KiB
14Accepted4/417ms12384 KiB
15Time limit exceeded0/3256ms5476 KiB
16Time limit exceeded0/4282ms5364 KiB
17Time limit exceeded0/4266ms5652 KiB
18Time limit exceeded0/4250ms5548 KiB
19Time limit exceeded0/4279ms5348 KiB
20Time limit exceeded0/4223ms5360 KiB
21Time limit exceeded0/3263ms5640 KiB
22Time limit exceeded0/4270ms5696 KiB