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.
Not sure how the sequence works. My solution:
7
1
2
3
9
36
9900
603900
main <<< duration: 4 ms
1->0 : 1
main <<< duration: 0 ms
2->1->0 : 2
main <<< duration: 0 ms
3->2->1->0 : 3
main <<< duration: 0 ms
9->3->2->1->0 : 4
main <<< duration: 0 ms
36->12->4->2->1->0 : 5
main <<< duration: 12 ms
9900->132->12->4->2->1->0 : 6
main <<< duration: 1859 ms
603900->9900->132->12->4->2->1->0 : 7
main <<< totalDuration: 1875 ms
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Down to Zero II
You are viewing a single comment's thread. Return to all comments →
Not sure how the sequence works. My solution: 7 1 2 3 9 36 9900 603900 main <<< duration: 4 ms 1->0 : 1 main <<< duration: 0 ms 2->1->0 : 2 main <<< duration: 0 ms 3->2->1->0 : 3 main <<< duration: 0 ms 9->3->2->1->0 : 4 main <<< duration: 0 ms 36->12->4->2->1->0 : 5 main <<< duration: 12 ms 9900->132->12->4->2->1->0 : 6 main <<< duration: 1859 ms 603900->9900->132->12->4->2->1->0 : 7 main <<< totalDuration: 1875 ms