Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = raw_input()
- lmax = 0
- ltemp = 0
- sout = ''
- stemp = ''
- for i in xrange(len(s)):
- if s[i] in stemp:
- p = stemp.find(s[i])
- stemp = stemp[p + 1:]
- stemp += s[i]
- ltemp = len(stemp)
- else:
- stemp += s[i]
- ltemp += 1
- if lmax < ltemp:
- lmax = ltemp
- sout = stemp
- print sout
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement