Submission #19561056


Source Code Expand

Copy
import math
import collections
import copy
import random
N,X=map(int,input().split())
S=input()
# a=list(map(int,input().split()))
# b=list(map(int,input().split()))

def maru(seikai,mozi):
    for a in mozi:
        if a=="o":
            seikai+=1
        elif a=="x" and seikai>0:
            seikai-=1
        else:
            pass
    return seikai

print(maru(X,S))




Submission Info

Submission Time
Task B - Quizzes
User kodio12
Language Python (3.8.2)
Score 200
Code Size 401 Byte
Status AC
Exec Time 48 ms
Memory 10220 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 36 ms 10044 KB
random_02.txt AC 30 ms 9980 KB
random_03.txt AC 23 ms 10036 KB
random_04.txt AC 42 ms 10032 KB
random_05.txt AC 43 ms 9980 KB
random_06.txt AC 48 ms 10220 KB
random_07.txt AC 39 ms 10028 KB
sample_01.txt AC 29 ms 9852 KB
sample_02.txt AC 22 ms 9840 KB
sample_03.txt AC 23 ms 9860 KB