192532025-12-02 19:45:22birozsLegtöbb gyümölcs (40 pont)python3Wrong answer 0/4071ms3892 KiB
N = int(input())
T = input()
dbA = 0
dbK = N // 2
for k in T:
    if k == "A":
        dbA += 1
    else:
        dbK -= 1
    print(dbA,dbK)
    if dbA == dbK:
        print(2*dbA)
        break
SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/016ms3124 KiB
2Wrong answer0/070ms3804 KiB
3Wrong answer0/214ms2860 KiB
4Wrong answer0/216ms3064 KiB
5Wrong answer0/214ms2868 KiB
6Wrong answer0/216ms2976 KiB
7Wrong answer0/214ms3104 KiB
8Wrong answer0/317ms3236 KiB
9Wrong answer0/317ms3192 KiB
10Wrong answer0/318ms3320 KiB
11Wrong answer0/337ms3448 KiB
12Wrong answer0/343ms3464 KiB
13Wrong answer0/350ms3648 KiB
14Wrong answer0/352ms3732 KiB
15Wrong answer0/368ms3892 KiB
16Wrong answer0/371ms3840 KiB
17Wrong answer0/364ms3776 KiB