fork download
  1. # your code goes here
  2. try:
  3. a=input()
  4. b=input()
  5. for i in range(int(input())):
  6. v=int(input())
  7. a1=a*int(v/2)
  8. a1=a1[:v]
  9. print(a1.count(b))
  10. except:
  11. pass
  12.  
Success #stdin #stdout 0.02s 9056KB
stdin
Standard input is empty
stdout
Standard output is empty