Capital OneOA #2
Octavian Lunar Calendar — Phase of Date
Estimated EasyJudge-ready
Topics (AI-labelled)Bits & MathSimulation
An Octavian year is divided into months with the same lengths as the 12 months of the Earth Gregorian calendar (a fixed non-leap year), and there are 8 cyclic moon phases: NewMoon, Crescent, Quarter, Gibbous, Full, Waning, Eclipse, Twilight. Given the phase at the start of the year, a month, and a day of that month, find the phase on that date.
Input
One line with three fields: startPhase month day. startPhase is one of the 8 names above; 1≤month≤12, and day is within the valid range for that month.
Output
Output the name of the moon phase on that date.
Example 1
Input:
NewMoon 1 1
Output:
NewMoon
Example 2
Input:
NewMoon 1 2
Output:
Crescent
Example 3
Input:
Twilight 12 31
Output:
Gibbous
Editorial
Loading solution…