CSES - Datatähti 2022 loppu - Results
Submission details
Task:Järjestys
Sender:okkokko
Submission time:2022-01-22 13:06:27 +0200
Language:Python3 (PyPy3)
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED100
Test results
testverdicttime
#1ACCEPTED0.07 sdetails

Code

def I():
return map(int, input().split())
def main():
t = int(input())
for _ in range(t):
jono = input()
print(jono.count("B", 0, jono.count("A")))
if __name__ == "__main__":
main()

Test details

Test 1

Verdict: ACCEPTED

input
1000
BBAABBBBAAABABBBAABBAABAAAABBB...

correct output
10
10
20
3
20
...

user output
10
10
20
3
20
...
Truncated