Submission #73938947


Source Code Expand

N = input()
S = input()

count_T = 0
count_A = 0

if(int(N) % 2 == 0):
    judge = int(N) / 2

    for i in range(0,int(N)):
        if(S[i] == 'A'):
            count_A += 1
        else:
            count_T += 1
        
        if(count_A == judge):
            print("A")
            break
        elif(count_T == judge):
            print("T")
            break
else:
    for i in range(0,int(N)):
        if(S[i] == 'A'):
            count_A += 1
        else:
            count_T += 1 

    if(count_A < count_T):
        print("T")
    else:
        print("A")

Submission Info

Submission Time
Task B - Overall Winner
User Iss4
Language Python (PyPy 3.11-v7.3.20)
Score 100
Code Size 599 Byte
Status AC
Exec Time 55 ms
Memory 79920 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 15
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
Case Name Status Exec Time Memory
00_sample_00.txt AC 54 ms 79884 KiB
00_sample_01.txt AC 54 ms 79748 KiB
00_sample_02.txt AC 55 ms 79828 KiB
01_random_00.txt AC 53 ms 79812 KiB
01_random_01.txt AC 53 ms 79768 KiB
01_random_02.txt AC 52 ms 79812 KiB
01_random_03.txt AC 53 ms 79684 KiB
01_random_04.txt AC 53 ms 79916 KiB
01_random_05.txt AC 53 ms 79884 KiB
01_random_06.txt AC 54 ms 79828 KiB
01_random_07.txt AC 53 ms 79784 KiB
01_random_08.txt AC 53 ms 79748 KiB
01_random_09.txt AC 53 ms 79684 KiB
01_random_10.txt AC 53 ms 79920 KiB
01_random_11.txt AC 54 ms 79688 KiB