94分python求助,实在不知道哪

P3741 小果的键盘

```python n = int(input()) s = input() temp = s.count('VK') s = s.replace('VK','-') tempv=s.count('VV') tempk=s.count('KK') if tempv>=1 or tempk >=1: temp += 1 print(temp) ``` 这道题其实练range的不用的,你看我的代码
by shiyiheng @ 2023-01-18 15:36:49


@[shiyiheng](/user/731397) 练——连,的——都
by shiyiheng @ 2023-01-18 15:47:24


@[shiyiheng](/user/731397) 奥明白了!谢谢大佬!
by hsing @ 2023-01-18 21:44:43


|