TOPIC

Passed all debug but 5% :)

Antonio Mello Babo asked 9 months ago

times = int(input())

screwed = ''

for time in range(0,times):
    alunos = int(input())

    names = [(x) for x in input().split()]
    presenças = [x for x in input().split()]

    new_word = ''

    for presença in presenças:
        aluno_atual = presenças.index(presença)
        if presença.count('M') > 0:
            for e in presença:
                if e != 'M':
                    new_word += e
            presença = new_word   

        A = presença.count('A')

        tam_total = len(presença)

        total = 100 - (A * 100 / tam_total)

        if total < 75:
            screwed += f'{names[aluno_atual]} '

        presenças[aluno_atual] = 'XXXXXX'

    if len(screwed) > 0:
        print(screwed.strip())
    else:
        print('')

    screwed = ''

Remember not post solutions. Your post may be reviewed by our moderators.

  • bpeter replied 8 months ago

    Ainda precisas de ajuda?