Skip to content

Commit 0dbb3ed

Browse files
committed
0412
1 parent 9dbf816 commit 0dbb3ed

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed

.idea/workspace.xml

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
N = int(input())
2+
M = int(input())
3+
txt = input()
4+
I = N + 1
5+
O = N
6+
Total = I + O
7+
compare = ''
8+
for i in range(Total):
9+
if i % 2 == 0:
10+
compare += 'I'
11+
else:
12+
13+
compare += 'O'
14+
cnt=0
15+
for i in range(len(txt)):
16+
if txt[i:i + Total] ==compare:
17+
cnt+=1
18+
print(cnt)

solve.ac/class 3/5525_IOIOI/5525_IOIOI.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)