HHC 2014 Programming Contest
|
09-24-2014, 11:24 AM
Post: #5
|
|||
|
|||
RE: HHC 2014 Programming Contest
An odd number of PDPs happen in pairs when 12/31 and 1/1 are prime, but only when the next New Year isn't also prime. Assume there is a 4 year range. Call the number representing the year before this range X. Now compute the offsets K1, K2, etc. to the supposedly prime days. Take the offsets mod 3 and you find that at least one is 0, 1, or 2. That means that regardless of what X mod 3 is, (X + Kn) mod 3 will be zero for at least one of the Kn's.
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 17 Guest(s)