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.
It seems to me that there is a wrong example with bounce off 11 surfaces. My answer for the case is 6 ways (not 2 ways).
The printed example shows the laser beam entering by angle 13.897886248014 deg relative to the vertical (and by simmetrical angle -13.897886248014 deg).
But there will be also bounce off 11 surfaces for laser beams by the angles 22.4109105310251 deg (and -22.4109105310251 deg) and 4.71500395394821 deg (and -4.71500395394821 deg).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #202: Laserbeam
You are viewing a single comment's thread. Return to all comments →
It seems to me that there is a wrong example with bounce off 11 surfaces. My answer for the case is 6 ways (not 2 ways). The printed example shows the laser beam entering by angle 13.897886248014 deg relative to the vertical (and by simmetrical angle -13.897886248014 deg). But there will be also bounce off 11 surfaces for laser beams by the angles 22.4109105310251 deg (and -22.4109105310251 deg) and 4.71500395394821 deg (and -4.71500395394821 deg).