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.
- Journey to the Moon
- Discussions
Journey to the Moon
Journey to the Moon
Sort by
recency
|
23 Discussions
|
Please Login in order to post a comment
The answer seems wrong.
after finding components and number on each component, with the same syntax used in the editorial soln, the final calculation should be:
This is basically keeping the property of the_count: it is the number of possible interactions until ith component. Addition of each new component creates itself times the total number of nodes; as an addition to previous possibilities.
This changes half of the test cases.
The C# boiler plate is broken.
You need to change the return type from int to long.
Kotlin solution. Note that the return type of journeyToMoon needs to be changed to Long to pass test case 11 which otherwise overflows.