Project Euler #186: Connectedness of a network.

  • + 1 comment

    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 ^^'