blob: c0d535b798989856994db714d8226dabeaa3cd51 (
plain)
1
2
3
4
5
6
7
8
9
10
|
def count_Rectangles(radius):
rectangles = 0
diameter = 2 * radius
diameterSquare = diameter * diameter
for a in range(1, 2 * radius):
for b in range(1, 2 * radius):
diagnalLengthSquare = (a * a + b * b)
if (diagnalLengthSquare <= diameterSquare) :
rectangles += 1
return rectangles
|