34
5
You are a space tourist on your way to planet Flooptonia! The flight is going to take another 47,315 years, so to pass the time before you're cryogenically frozen you decide to write a program to help you understand the Flooptonian calendar.
Here is the 208-day long Flooptonian calendar:
Month Days Input Range
Qupu 22 [0-22)
Blinkorp 17 [22-39)
Paas 24 [39-63)
Karpasus 17 [63-80)
Floopdoor 1 [80]
Dumaflop 28 [81-109)
Lindilo 32 [109-141)
Fwup 67 [141-208)
Challenge
Your program, given an integer day in the year (range [0-208)
) is to output the corresponding day of the month and name of the month (e.g. 13 Dumaflop
).
There is an exception, however: Floopdoor a special time for Flooptonians that apparently deserves its own calendar page. For that reason, Floopdoor isn't written with a day (i.e. the output is Floopdoor
, not 1 Floopdoor
).
Test Cases
0 => 1 Qupu
32 => 11 Blinkorp
62 => 24 Paas
77 => 15 Karpasus
80 => Floopdoor
99 => 19 Dumaflop
128 => 20 Lindilo
207 => 67 Fwup
Rules
- You must write a complete program.
- You can assume that the input is always valid.
- Your output may have a trailing newline but must otherwise be free of any extra characters. The case should also match the provided examples.
- You may use date/time functions.
- Code length is to be measured in bytes.
Does the output's case matter? – Downgoat – 2015-07-24T16:40:02.493
Yes it does, I'll clarify in the post. – Sean Latham – 2015-07-24T16:42:11.003
2Is it "Floopdoor" or "Floopdor"? The first chart has the extra
o
, but the other instances of the name don't. – jwodder – 2015-07-24T17:11:16.143Ah, forgive my typo! :) I've changed it to "Floopdoor" as the majority of the current answers use that already. – Sean Latham – 2015-07-24T17:20:55.253
4So... in 47k years, nothing will change? – Not that Charles – 2015-07-24T19:43:51.363
2@NotthatCharles furthermore, if the planet's that far away, won't it be outdated by the time you get it in the first place? – SuperJedi224 – 2015-07-25T00:56:11.263
3As if the Gregorian calendar wasn't bad enough. – Arturo Torres Sánchez – 2015-07-25T03:11:44.573
3@ArturoTorresSánchez Well at least there is no leap year. But are there any other stories about Flooptonia, or was the entire setting created solely for this specific puzzle? Is Fwup their word for winter? Or should I just get my tail back to Worldbuilding? – Damian Yerrick – 2015-07-26T02:31:30.140