fork download
  1. s1="aalkkaazylkkkkkkkasdakkkkkkkk"
  2. k=0
  3. c=0
  4. for i in s1:
  5. if i=='k': c += 1
  6. else: c=0
  7. if c > k: k=c
  8. print(k)
Success #stdin #stdout 0.13s 14056KB
stdin
aalkkaaylkkkkkkkkkasddkkkrftgkkkkk
stdout
8