Skip to content

Instantly share code, notes, and snippets.

@yungyungGwon
Last active October 1, 2021 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yungyungGwon/08bf80cb0f50c56727e1f9db711f3d2d to your computer and use it in GitHub Desktop.
Save yungyungGwon/08bf80cb0f50c56727e1f9db711f3d2d to your computer and use it in GitHub Desktop.
def solution(brown, yellow):
sum = brown + yellow
for i in range (sum, 2, -1):
if sum % i == 0:
j = sum // i
if yellow == (i-2)*(j-2):
return [i,j]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment