27
Tomorrow, November 23rd, is Thanksgiving Day in the United States. To prepare, you need to cook up some ASCII turkeys. However, since you're late in planning, you need a program (or function) to help you with how many birds you need to prepare.
.---. _
.' './ )
/ _ _/ /\
=(_____) (__/_/==
===================
The turkeys you found are rather on the small side, so you've figured out the following ratios -- one turkey will feed:
- four people who only like white meat and three people who only like dark meat
- or seven people who don't care either way
- or a combination thereof.
Meaning, there are a total of 4 servings of white meat and 3 servings of dark meat in any given turkey. Further, you can't purchase and cook a partial turkey.
For example, for 3 people who only like white meat, 6 people who only like dark meat, and 3 people who don't care, you'll need two turkeys. That gives 8 servings of white and 6 servings of dark, which is enough to satisfy everyone and have some leftover white meat:
.---. _ .---. _
.' './ ) .' './ )
/ _ _/ /\ / _ _/ /\
=(_____) (__/_/== =(_____) (__/_/==
=====================================
For 20 people who don't care, you'll need three turkeys, and have either a little bit of white or dark leftover:
.---. _ .---. _ .---. _
.' './ ) .' './ ) .' './ )
/ _ _/ /\ / _ _/ /\ / _ _/ /\
=(_____) (__/_/== =(_____) (__/_/== =(_____) (__/_/==
=======================================================
And so on.
Rules
- The three inputs can be in any order you choose, and in any convenient format. Please indicate in your answer how the input is taken.
- There will never be a requirement for more than 25 turkeys (so a maximum of 175 people to feed).
- Leading/trailing newlines or other whitespace are optional, provided that the characters line up appropriately.
- Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
- Output can be to the console, returned as a list of strings, returned as a single string, etc.
- Standard loopholes are forbidden.
- This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.
your ratios don't quite make sense to me - you seem to imply that the 7 people who don't care only get the leftovers, but seem to write that a turkey can feed 3+4+7 = 14 people (or that one turkey might only be enough to feed 3 dark meat eaters). – dzaima – 2017-11-22T17:28:11.297
@dzaima From the examples, it seems that one turkey has 4 servings of white meat and 3 of dark. So it serves (4 people who only like white meat AND 3 people who only like dark meat) OR 7 people with no preference. – KSmarts – 2017-11-22T17:34:54.117
@KSmarts that's what I'm saying in my comment too, but the text doesn't say that well – dzaima – 2017-11-22T17:36:20.213
@dzaima KSmarts has it correct. There are 4 servings of white and 3 of dark in any given turkey. I'll make that a bit more clear. – AdmBorkBork – 2017-11-22T17:37:41.487
Are all 25 turkeys to be printed in one huge horizontal line? – Neil – 2017-11-22T17:54:23.253
1How should the turkeys be put next to each other? It seems as that none of the current answers have that overlap that the examples do – dzaima – 2017-11-22T18:19:18.653
@dzaima I guess I didn't explicitly specify, so as long as they're turkeys all in a row, that's fine. – AdmBorkBork – 2017-11-22T18:50:07.557
@Neil Yes, all one row of turkeys (you have a big table). – AdmBorkBork – 2017-11-22T18:50:22.670
4Do we get a bounty for a solution in Chicken? – Uriel – 2017-11-22T23:11:08.273