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.
This problem is so horribly written, it needs to be completely redone, that gives the leap year formula in the problem statement. And that's not mentioning this line 'Firstly, sequentially concatinate the date, month and year, into a new integer x erasing the leading zeroes.'
But in a solution that 100% works, x contains dates like this 2082025 which is 2 08 2025, so there is a leading zero for the month.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Prime Dates
You are viewing a single comment's thread. Return to all comments →
This problem is so horribly written, it needs to be completely redone, that gives the leap year formula in the problem statement. And that's not mentioning this line 'Firstly, sequentially concatinate the date, month and year, into a new integer x erasing the leading zeroes.' But in a solution that 100% works, x contains dates like this 2082025 which is 2 08 2025, so there is a leading zero for the month.