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.
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.