Skip to content

Instantly share code, notes, and snippets.

@eupp
Last active October 6, 2017 20:03
Show Gist options
  • Save eupp/f6e3ddcce80a633ee412beba1230deed to your computer and use it in GitHub Desktop.
Save eupp/f6e3ddcce80a633ee412beba1230deed to your computer and use it in GitHub Desktop.
def fuck(n):
A = [0] * (n+1)
B = [-1] * (n+1)
for i in range(2, n+1):
A[i] = A[i - 1]
B[i] = i-1
if i % 2 == 0 and A[int(i / 2)] < A[i]:
A[i] = A[int(i / 2)]
B[i] = int(i / 2)
if i % 3 == 0 and A[int(i / 3)] < A[i]:
A[i] = A[int(i / 3)]
B[i] = int(i / 3)
A[i] += 1
print(A[1:])
print(B[1:])
fuck(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment