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 am more or less done, but I am stuck with 1 strange bug.
I am counting how many numbers I have generated until the prime minister has enough "friends". If I divide that number by 2, I get the number of calls. My solution is 622573 calls (622572 would be right) for the test case.
Thats why I subtract 1 from my "solution", but that way I only get 60 points (12/20 testcases correct). If I subtract 2 from my "solution", I get 35 points (7/20 testcases correct). As for testcase 20/20, I never got that one right.
What could be my bug/misunderstanding of the problem??
Edit: fixed it now. 100/100points. forgot to count the misdials ^^'
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #186: Connectedness of a network.
You are viewing a single comment's thread. Return to all comments →
hey, I need help.
I am more or less done, but I am stuck with 1 strange bug.
I am counting how many numbers I have generated until the prime minister has enough "friends". If I divide that number by 2, I get the number of calls. My solution is 622573 calls (622572 would be right) for the test case.
Thats why I subtract 1 from my "solution", but that way I only get 60 points (12/20 testcases correct). If I subtract 2 from my "solution", I get 35 points (7/20 testcases correct). As for testcase 20/20, I never got that one right.
What could be my bug/misunderstanding of the problem??
Edit: fixed it now. 100/100points. forgot to count the misdials ^^'