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.
I have my test #2 and #3 wrong, but I am almost sure than I am doing everything correctly.
I even checked the int overflow (2^32) and change it to BigDecimal, remove the scientific notation to display out as "single integer".
Can someone check my result for the first N 10 cases?
1 = 1 (2/1=2 this would be no loss no gain,so -1),
2 = 5 (6/1=6 this would be no loss no gain,so -1),
3 = 3 (24/7),
4 = 10 (120/11),
5 = 7 (720/101),
6 = 25 (5040/197),
7 = 17 (40320/2311),
8 = 70 (362880/5119),
9 = 49 (3628800/73639),
10 = 225 (39916800/177299),
Still can't figure out what i am doing wrong or how to debug it. I would love some guidance, thanks in advanced :)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #121: Disc game prize fund
You are viewing a single comment's thread. Return to all comments →
I have my test #2 and #3 wrong, but I am almost sure than I am doing everything correctly.
I even checked the int overflow (2^32) and change it to BigDecimal, remove the scientific notation to display out as "single integer".
Can someone check my result for the first N 10 cases? 1 = 1 (2/1=2 this would be no loss no gain,so -1), 2 = 5 (6/1=6 this would be no loss no gain,so -1), 3 = 3 (24/7), 4 = 10 (120/11), 5 = 7 (720/101), 6 = 25 (5040/197), 7 = 17 (40320/2311), 8 = 70 (362880/5119), 9 = 49 (3628800/73639), 10 = 225 (39916800/177299),
Still can't figure out what i am doing wrong or how to debug it. I would love some guidance, thanks in advanced :)