Skip to main content
edited body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Python 2, 7878 75 bytes

def f(x):l=len(x)/2;return l and[n*x[l]for2;return[n*x[l]*f(x[:l])for n in x[l:]]==x[:l]*f(x[:l])or[1]==xl]>[]or[1]==x

Try it online!Try it online!

Python 2, 78 bytes

def f(x):l=len(x)/2;return l and[n*x[l]for n in x[l:]]==x[:l]*f(x[:l])or[1]==x

Try it online!

Python 2, 78 75 bytes

def f(x):l=len(x)/2;return[n*x[l]*f(x[:l])for n in x[l:]]==x[:l]>[]or[1]==x

Try it online!

Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Python 2, 78 bytes

def f(x):l=len(x)/2;return l and[n*x[l]for n in x[l:]]==x[:l]*f(x[:l])or[1]==x

Try it online!