Submission #72574824


Source Code Expand

N = int(input())
S = list(input())
ans = 0
for i in range(N):
    for j in range(i + 1,N):
        for k in range(j + 1 ,N):
            if S[i] == "E" and S[j] == "G" and S[k] == "F" and i != j != k:
                ans += 1

print(ans)

Submission Info

Submission Time
Task C - EGFカウント
User guild2026_074
Language Python (PyPy 3.11-v7.3.20)
Score 100
Code Size 246 Byte
Status AC
Exec Time 62 ms
Memory 90772 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 18
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 53 ms 79620 KiB
00_sample_01.txt AC 53 ms 79624 KiB
00_sample_02.txt AC 52 ms 79832 KiB
01_random_00.txt AC 53 ms 79484 KiB
01_random_01.txt AC 52 ms 79704 KiB
01_random_02.txt AC 62 ms 89980 KiB
01_random_03.txt AC 60 ms 88640 KiB
01_random_04.txt AC 57 ms 87588 KiB
01_random_05.txt AC 59 ms 88848 KiB
01_random_06.txt AC 54 ms 85848 KiB
01_random_07.txt AC 61 ms 90772 KiB
01_random_08.txt AC 51 ms 79512 KiB
01_random_09.txt AC 62 ms 90468 KiB
01_random_10.txt AC 56 ms 85612 KiB
01_random_11.txt AC 62 ms 89500 KiB
01_random_12.txt AC 52 ms 79624 KiB
01_random_13.txt AC 60 ms 90256 KiB
01_random_14.txt AC 61 ms 88852 KiB