Skip to main content
3 of 3
deleted 10 characters in body
st0le
  • 2.2k
  • 19
  • 23

Python

Used the fact that the length of a valid string will always be a Triangle Number.

t=raw_input()
x=int(len(t+t)**.5)
print t==''.join(t[i:x]for i in range(x))

A Ruby solution might be shorter, will post soon.

st0le
  • 2.2k
  • 19
  • 23