Challenge - Lucky Number Of a Couple | Sololearn: Learn to code for FREE!


Challenge - Lucky Number Of a Couple

Defined the lucky number of a couple as the days between their births (both dates included) and given their birthdays as yyyy/mm/dd, write an algorithm to find out their lucky number. ※Remember the leap years For example, given 1987/3/31 and 1989/3/31, you should return 732. (exactly 2 years, and 1988 is a leap year)

6/29/2017 3:19:07 PM

Flandre Scarlet

6 Answers

New Answer


Here you go.


Should any specific language be used? And how is the data entered? As an array? Or string? Or something else?


The value returned should always be in days? Do you already have a solution figured out?


Alright, thanks for a challenge that other people haven't gotten to yet!


@J.G. yes, and yes


@J.G. any kind is ok