## CCC '06 J1 - Canadian Calorie Counting

View as PDF

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

Problem type
##### Canadian Computing Competition: 2006 Stage 1, Junior #1

At Chip's Fast Food emporium there is a very simple menu. Each food item is selected by entering a digit choice.

 Here are the three burger choices: 1 – Cheeseburger (461 Calories) 2 – Fish Burger (431 Calories) 3 – Veggie Burger (420 Calories) 4 – no burger Here are the three drink choices: 1 – Soft Drink (130 Calories) 2 – Orange Juice (160 Calories) 3 – Milk (118 Calories) 4 – no drink Here are the three side order choices: 1 – Fries (100 Calories) 2 – Baked Potato (57 Calories) 3 – Chef Salad (70 Calories) 4 – no side order Here are the three dessert choices: 1 – Apple Pie (167 Calories) 2 – Sundae (266 Calories) 3 – Fruit Cup (75 Calories) 4 – no dessert

Write a program that will compute the total Calories of a meal.

#### Input Specification

The program should input a number for each type of item then calculate and display the Calorie total. The first line will be the customer's choice of burger, the second will be the choice of side, then drink, then dessert. You may assume that each input will be a number from 1 to 4. That is, each customer has to pick exactly one number from each of the four options out of each of the four categories.

#### Output Specification

The program prints out the total Calories of the selected meal, and stops executing after this output.

#### Sample Input

2
1
3
4

#### Sample Output

Your total Calorie count is 649.

#### Explanation

The customer chose Burger #2, Side #1, Drink #3 and Dessert #4.

• commented on April 11, 2024, 2:00 a.m.

The test is weird whenever I prompt the user in the input it wont except it as valid solution.
Ex
burger_input=int(input()) valid

• commented on May 23, 2024, 1:24 a.m.

don't prompt them its just data no prompting required this applies to all dmoj questions

• commented on May 22, 2024, 5:33 p.m.

Are you running burger_input=int(input("Please choose your burger: ")) in DMOJ? If so, it should not work as all inputs should contain no text. Otherwise, there might be something wrong with your compiler. Try the PyCharm community edition.

• commented on Nov. 30, 2023, 5:33 a.m.

Don't forget the period at the end of "Your total Calorie count is x."

That tripped me up for longer than I would like to admit when I kept getting it wrong and couldn't figure out why.

• commented on Nov. 19, 2017, 1:41 p.m. edited

Rather than asking for help in comments, which severely clutters up the comments stream, you can go to https://discord.com/invite/EgJVpxz and ask for help in the #help channel. You will be able to get quicker responses and better explanations.