fork(1) download
  1. s=input()
  2. t=input()
  3. count=0
  4. a=s.find(t)
  5. if a==-1:
  6. print (0)
  7. else:
  8. print (a)
  9. while a>-1:
  10. s=s[a+1:-1]
  11. a=s.find(t)
  12. count+=1
  13. print (count)
Success #stdin #stdout 0.03s 9684KB
stdin
hello ditmemay
l
stdout
2
2