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.
but if you look at q as 4 which is perfect square,and p as 3, so we ended up with 3/4 which we can get from (7/8)x(6/7). I guess both q and p can be perfect square,unless they aren't perfect square at the same time because then whole fraction will be perfect square
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Join us
Create a HackerRank account
Be part of a 26 million-strong community of developers
Please signup or login in order to view this challenge
Project Euler #100: Arranged probability
You are viewing a single comment's thread. Return to all comments →
but if you look at q as 4 which is perfect square,and p as 3, so we ended up with 3/4 which we can get from (7/8)x(6/7). I guess both q and p can be perfect square,unless they aren't perfect square at the same time because then whole fraction will be perfect square