An Animal Contest 3 P1 - Monkey Shopping

View as PDF

Submit solution


Points: 3
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type

KeenKen the monkey is going shopping! KeenKen currently has A units of sugar, but he needs B units of sugar. He has C units of toothpaste, but he needs D units of toothpaste.

If he doesn't have enough sugar, he will have to go to the grocery store to get some. If he doesn't have enough toothpaste, he will have to go to the pharmacy. However, if he needs both, he can get them both at the department store, but that is farther away. Thus, he will only visit the department store if he needs to get both items.

If he doesn't need to get either item, KeenKen will stay home.

Please tell KeenKen what to do!

Constraints

0 \le A, B, C, D \le 100

Input Specification

The first and only line will contain four space-separated integers, A, B, C, D.

Output Specification

Output one line with the command KeenKen should complete. The output should correspond with one of the following:

  • Go to the grocery store
  • Go to the pharmacy
  • Go to the department store
  • Stay home

Sample Input 1

1 2 3 4

Sample Output 1

Go to the department store

Explanation for Sample 1

KeenKen has 1 unit of sugar which is less than the 2 units required. He has 3 units of toothpaste which is less than the 4 units required. Since he needs more of both items, he should visit the department store.

Sample Input 2

72 7 42 0

Sample Output 2

Stay home

Comments


  • 0
    imlivin  commented on March 1, 2024, 2:30 a.m.

    Anyone else get "presentation error"? It says I have unnecessary white space but I don't. (Using C++20)


    • 0
      imlivin  commented on March 1, 2024, 6:17 p.m.

      REMEMBER TO PRINT A NEW LINE AFTER EACH 💀


  • 0
    daveys  commented on Feb. 1, 2024, 3:24 p.m.

    Rookie mistake: I submitted a few times, messing about with the logic slightly each time until I finally realised that I had left a print statement in the code! Doh!


  • 2
    kittycornanna1  commented on Dec. 25, 2023, 5:00 p.m. edited

    Can't you get both at a grocery store? You don't even need to go to the department store.


  • 6
    gavin_chen  commented on March 19, 2022, 8:24 p.m. edited

    But seriously no one gets "Toothpaste" from the pharmacy


  • 8
    DOUi  commented on Oct. 1, 2021, 2:17 p.m.

    Go to the grocery store


    • 0
      gavin_chen  commented on March 19, 2022, 8:23 p.m.

      Pandemic noises


    • 2
      tappbros  commented on Oct. 30, 2021, 1:55 a.m.

      WHO NEEDS FOOD STAY HOME AND SLEEP