90,求大佬(python)
查看原帖
90,求大佬(python)
1251006
cqh_123楼主2024/3/7 17:41

k=int(input())

a=input()

tnt=0

str1=a[0]

for i in a:

  if tnt>=k:
      print(str1)
      break
  if i!=str1:
      str1=i
      tnt=1
  else:
      tnt+=1

else:

	print('no')
2024/3/7 17:41
加载中...