Brilliant has a feature that records the number of consecutive days that a certain user has been solving problems. This is called the problem solving streak. The problem solving streak for a user is shown next to a small fire icon, as shown above.
Suppose a user on Brilliant starts solving problems on January and gains a problem solving streak of days. Let represent the date on which this user last solves problems, based on the streak. Let and be the positive integers that represent the month, day, and year, respectively, of
Given that there are days between January and June , inclusive, of a leap year, calculate
(As an example, if the date in question were March or and )
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
If I mention any years on their own, I mean the first day of that year. or January 1 .
First, let's find Y . We do this by figuring out the greatest number of days that could have passed between 2 0 1 5 and Y , inclusive; the number of days is no greater than 2 0 1 5 . There are 3 6 5 days in a regular year and 3 6 6 days in a leap year. So, we start counting: 3 6 5 days pass from 2 0 1 5 − 2 0 1 6 , 3 6 5 + 3 6 6 = 7 3 1 days pass from 2 0 1 5 − 2 0 1 7 (this is because 2 0 1 6 is a leap year), and so on until we get to 2 0 2 1 . At this point, the total number of days that have passed since 2 0 1 5 is 2 1 9 2 , which is greater than 2 0 1 5 . Thus, we get Y = 2 0 2 0 .
The number of days between 2 0 1 5 and 2 0 2 0 , inclusive, is 1 8 2 6 , which leaves 2 0 1 5 − 1 8 2 6 = 1 8 9 days left for 2 0 2 0 , starting from January 1 . However, there are 1 8 1 days between the start of January and the end of June. Thus, starting from July 1 , there are 1 8 9 − 1 8 1 = 8 days left. This gives July 8 as our final day. July, written as a number, is 7 , so M = 7 . Finally, D = 8 .
This gives M + D + Y = 7 + 8 + 2 0 2 0 = 2 0 3 5 .
(I have boxed the values for the month, day, and year in case you do not want to read everything.)