Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Euclidean Division
Post Body

I am asked to find on which day of the week a specific date falls, from a base date. The first part is for one particular date (14th of July 1789, from 14th of July 2012 which we know is a saturday. I found it is a Tuesday). In the second part, I need to generalize my method to any date.

They tell me I need the number of days between date 1 and 2, but for that i need to know if the year is a leap year or a "normal" year. A leap year is either divisible by 400 or divisible by 4 w/o being divisible by 100.

The book proposes that, in order to find how many years are divisible by 400 between year 1 and year A, we need to take the quotient of the Euclidean Division of (A-1) by 400 so (A-1) = 400q r. q being the number of years divisible by 400.

I didn't understand it at first but later thought of it this way: if q shows the number of times 400 goes into (A-1) , then it also shows how many numbers forming (A-1) it can divide.

Does anyone have a better way of explaining it? Am I correct?

Author
Account Strength
100%
Account Age
7 years
Verified Email
Yes
Verified Flair
Yes
Total Karma
16,129
Link Karma
3,827
Comment Karma
12,284
Profile updated: 4 days ago
Posts updated: 1 week ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago