Skip to content

Instantly share code, notes, and snippets.

@libert-xyz
Created July 10, 2016 17:23
Show Gist options
  • Save libert-xyz/76d61809921d0bdd24ff9f54a05bf239 to your computer and use it in GitHub Desktop.
Save libert-xyz/76d61809921d0bdd24ff9f54a05bf239 to your computer and use it in GitHub Desktop.
#07/10/16
#https://www.hackerrank.com/challenges/find-a-string
s1 = raw_input()
s2 = raw_input()
tam = len(s2)
c = 0
for i in range(0,len(s1)):
if s1[i] == s2[0]:
if s1[i:i+tam] == s2:
c = c + 1
print c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment