Lucky Number
CodeChefOpen on judge ↗
Ram is an astrologer who calculates the lucky number of people using their date of birth. He uses the special formula to calculate their lucky number. The formula is dd*mm+yyyy if date of birth is in the format dd-mm-yyyy. Then he recursively adds all the digits of answer unless and until single digit is obtained. For example: 31-12-1995 is the date of birth of a person then his lucky number woul
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start