90分求助python3
查看原帖
90分求助python3
1374347
MAN24man24楼主2024/9/8 20:36

n=int(input()) m=input() x=m.count("VK") a=m.count("VVK") b=m.count("VKK") if m.count("VV")>0: if a>=m.count("VV"): if m.count("KK")>0: if b>=m.count("KK"): print(x) else: print(x+1) else: print(x) else:print(x+1) else: if m.count("KK")>0: if b>=m.count("KK"): print(x) else: print(x+1) else: print(x)

2024/9/8 20:36
加载中...