Advertisement
namemkazaza

C

Dec 13th, 2020
595
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. key = str(input())
  2. string = str(input())
  3. n = int(input())
  4. string = string * n
  5. count = 0
  6. for i in range(len(string)):
  7.     if string[i:i + len(key)] == key:
  8.         count += 1
  9. print(count)
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement