HHC 2018 Programming Contests
|
10-01-2018, 04:59 AM
(This post was last modified: 10-01-2018 05:06 AM by Didier Lachieze.)
Post: #39
|
|||
|
|||
RE: HHC 2018 Programming Contests
Here is my PPL program. I considered the Extrema Date to be a day during which at least two of the biorhythms would reached +100 or -100.
So first it gets the number of days between the input birthday and today (N). Then it calculates where we are, as of today, in each cycle (A,B,C) Then it generates for each biorhythm the list of the next 33 minimum and maximum days. I choosed 33 as it is the maximum number of minimum/maximum occurrences between two common days as I found comparing the lists of maximum/minimums for each biorhythm: there could be 33 physical minimum/maximum between two common physical/Intellectual days. Then it determines the first common day in two of the three lists (D) and the corresponding date (ED). The rest of the program is then the display of the results. Code: EXPORT EXTREMA(BD) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)