Submission #59576626
Source Code Expand
Copy
N, K = input().split()K = int(K)S = input()O_count = []count = 0for s in S:if s == "X":O_count.append(count)count = 0else:count += 1O_count.append(count)out = [count // K for count in O_count]print(sum(out))
N, K = input().split() K = int(K) S = input() O_count = [] count = 0 for s in S: if s == "X": O_count.append(count) count = 0 else: count += 1 O_count.append(count) out = [count // K for count in O_count] print(sum(out))
Submission Info
Submission Time | |
---|---|
Task | B - Strawberries |
User | Verniy73 |
Language | Python (CPython 3.11.4) |
Score | 200 |
Code Size | 259 Byte |
Status | AC |
Exec Time | 11 ms |
Memory | 8628 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
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, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 11 ms | 8448 KB |
00_sample_01.txt | AC | 10 ms | 8448 KB |
00_sample_02.txt | AC | 11 ms | 8520 KB |
01_random_00.txt | AC | 10 ms | 8464 KB |
01_random_01.txt | AC | 10 ms | 8540 KB |
01_random_02.txt | AC | 11 ms | 8496 KB |
01_random_03.txt | AC | 10 ms | 8532 KB |
01_random_04.txt | AC | 11 ms | 8460 KB |
01_random_05.txt | AC | 11 ms | 8492 KB |
01_random_06.txt | AC | 11 ms | 8416 KB |
01_random_07.txt | AC | 10 ms | 8572 KB |
01_random_08.txt | AC | 10 ms | 8412 KB |
01_random_09.txt | AC | 11 ms | 8452 KB |
01_random_10.txt | AC | 10 ms | 8444 KB |
01_random_11.txt | AC | 10 ms | 8436 KB |
01_random_12.txt | AC | 10 ms | 8524 KB |
01_random_13.txt | AC | 10 ms | 8440 KB |
01_random_14.txt | AC | 10 ms | 8388 KB |
01_random_15.txt | AC | 10 ms | 8628 KB |
01_random_16.txt | AC | 11 ms | 8532 KB |
01_random_17.txt | AC | 10 ms | 8420 KB |
01_random_18.txt | AC | 10 ms | 8528 KB |
01_random_19.txt | AC | 10 ms | 8416 KB |
01_random_20.txt | AC | 10 ms | 8576 KB |
01_random_21.txt | AC | 10 ms | 8524 KB |
01_random_22.txt | AC | 10 ms | 8464 KB |
01_random_23.txt | AC | 10 ms | 8484 KB |