Showing posts with label coach code. Show all posts
Showing posts with label coach code. Show all posts

9/8/22

Fruit Bowl

 You have a bowl on your counter with an even number of pieces of fruit in it. Half of them are bananas, and the other half are apples. You need 3 apples to make a pie.

Task

Your task is to evaluate the total number of pies that you can make with the apples that are in your bowl given to total amount of fruit in the bowl.

Input Format

An integer that represents the total amount of fruit in the bowl.

Output Format

An integer representing the total number of whole apple pies that you can make.

Sample Input

26

Sample Output

4

Popsicles

 You have a box of popsicles and you want to give them all away to a group of brothers and sisters. If you have enough left in the box to give them each an even amount you should go for it! If not, they will fight over them, and you should eat them yourself later.

Task

Given the number of siblings that you are giving popsicles to, determine if you can give them each an even amount or if you shouldn't mention the popsicles at all.

Input Format

Two integer values, the first one represents the number of siblings, and the second one represents the number of popsicles that you have left in the box.

Output Format

A string that says 'give away' if you are giving them away, or 'eat them yourself' if you will be eating them yourself.

Sample Input

3 9

Sample Output

give away


Blog Archive