Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open('26.txt')
- s = file.readline()
- x = 'DBAC'
- ans = 0
- while x in s:
- ans = len(x)
- x += 'DBAC'
- x = x[:-4]
- if x + 'D' in s:
- ans += 1
- if x + 'DB' in s:
- ans += 1
- if x + "DBA" in s:
- ans += 1
- print(ans)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement