CodeWars diet X51079


Statement
 

pdf   zip

html

Input Burry-KingTM menu in the form of one line for each dish with the name of the dish and calories contained. A line with a 0 will separate the menu from the selection of dishes for each organizer. Afterwards, the selection for each organizer, their name first and then the list of 4 dishes. A line with just a 1 will mark the end of the input.

Output A list with the name of each of the organizers and the type of diet they are following (Poor, Enough, Hyper-Caloric).

Public test cases
  • Input

    CheeseBurger 650
    BaconBurger 680
    PlainBurger 410
    ChickenWrap 340
    PlainSalad 125
    ChickenSalad 470  
    Nuggets 460
    MediumFries 370
    LargeFries 680
    MediumCoke 350
    LargeCoke 720
    Water 0
    0
    Marcus CheeseBurger Nuggets LargeFries LargeCoke
    James BaconBurger ChickenSalad MediumFries LargeCoke
    Laura PlainSalad PlainBurger MediumFries Water
    1
    

    Output

    Marcus Hyper-caloric
    James Enough
    Laura Poor
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    C++
    User solutions
    C++ Python