Skip to content

Instantly share code, notes, and snippets.

@CITGuru
Last active April 30, 2020 13:19
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 CITGuru/699a5513e82cc610884cb61c7c4509ab to your computer and use it in GitHub Desktop.
Save CITGuru/699a5513e82cc610884cb61c7c4509ab to your computer and use it in GitHub Desktop.
import math
def solution(area):
a = []
while area >= 1 and area <=10000000:
square = math.pow(math.floor(math.sqrt(area)), 2)
area = area - square
a.append(int(square))
return a
print(solution(12))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment