diff options
Diffstat (limited to 'progs/a718.py')
-rw-r--r-- | progs/a718.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/progs/a718.py b/progs/a718.py new file mode 100644 index 0000000..c0d535b --- /dev/null +++ b/progs/a718.py @@ -0,0 +1,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
\ No newline at end of file |