We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Since is an equilateral triangle all straight lines drawn from each vertex to the middle of the opposite side is also a height. In each height of an equilateral triangle we get an angle bisector, so we actually found four different angles to form new triangles. There are three types of triangles:60-60-60, 30-60-90, 30-30-120. Pay attention on directions formed by these divisions, parallel segments will help to count those triangles. It is possible to find a closed formula for this problem
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #163: Cross-hatched triangles
You are viewing a single comment's thread. Return to all comments →
Since is an equilateral triangle all straight lines drawn from each vertex to the middle of the opposite side is also a height. In each height of an equilateral triangle we get an angle bisector, so we actually found four different angles to form new triangles. There are three types of triangles:60-60-60, 30-60-90, 30-30-120. Pay attention on directions formed by these divisions, parallel segments will help to count those triangles. It is possible to find a closed formula for this problem