Last active
April 30, 2020 13:19
-
-
Save CITGuru/699a5513e82cc610884cb61c7c4509ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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