Algorithm: Sherlock And The Beast
SHERLOCK AND THE BEAST Bismillahirrahmanirrahim, My name is Muhammad Fazril Bin Azam Busra,1917135 In this blog, I saw an Interesting problem from Hackerrank. Since I'm one of the Sherlock Holmes fans, I wanted to try this problem to be dedicated to him. It's called Sherlock and The Beast. MY UNDERSTANDING First of all, the problem stated that Sherlock Holmes is having a suspicion towards Professor Moriarty regarding the professor's diabolical plan. Moriarty had provided some clues regarding his plan to sabotage The Beast with a virus The beast is a supercomputer owned by m16 which has been the subject of involvements of Moriarty. From the letter, Sherlock able to figure out some clues that in order to kill the virus, they have to find the largest decent numbers. A Decent Number has the following properties: Its digits can only be 3 's and/or 5 's. The number of 3 's it contains is divisible by 5 . The number of 5 's it contains is divisible by 3