Given r is the radius of three equal circles touching each other. The task is to find the length of the rope tied around the circles as shown below:
Input: r = 7
Input: r = 14
Approach: As it can be clearly seen from above image, the part of the length of rope which is not touching the circle is 2r + 2r + 2r = 6r.
The part of the rope which is touching the circles make a sector of 120 degrees on each circle. Thus, three sectors of 120 degrees each can be considered as a complete one circle of 360 degrees.
Therefore, Length of rope touching the circle is 2 * PI * r where PI = 22 / 7 and r is the radius of the circle.
Hence, the total length of the rope will be ( 2 * PI * r ) + 6r.
Below is the implementation of the above approach:
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Length of the direct common tangent between two externally touching circles
- Length of direct common tangent between the two non-intersecting Circles
- Length of the transverse common tangent between the two non intersecting circles
- Length of direct common tangent between two intersecting Circles
- Length of the perpendicular bisector of the line joining the centers of two circles
- Distance between centers of two intersecting circles if the radii and common chord length is given
- Ratio of the distance between the centers of the circles and the point of intersection of two transverse common tangents to the circles
- Ratio of the distance between the centers of the circles and the point of intersection of two direct common tangents to the circles
- Radii of the three tangent circles of equal radius which are inscribed within a circle of given radius
- Probability of cutting a rope into three pieces such that the sides form a triangle
- Count the number of subsequences of length k having equal LCM and HCF
- Number of non-decreasing sub-arrays of length greater than or equal to K
- Length of longest subarray with product greater than or equal to 0
- Minimum length String with Sum of the alphabetical values of the characters equal to N
- Number of ways of choosing K equal substrings of any length for every query
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : SURENDRA_GANGWAR