Input

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

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

I am a bit curious as to what am I doing wrong in my code? My code for some reason always seems to be in megabytes and always takes 0.003sec. My approach is very similar to some of the people in the best solutions part but I am a bit unsure as to why is my time soo off and program is soo huge?

I am a bit curious as to what am I doing wrong in my code? My code for some reason always seems to be in megabytes and always takes 0.003sec. My approach is very similar to some of the people in the best solutions part but I am a bit unsure as to why is my time soo off and program is soo huge?

Typically it's easiest to submit a "best solution" on a problem with a little more meat to it than this one; everyone's runtime is going to be about the same when there's not much work for the computer to do.
Compare this to a 10+ point problem where it's possible to time out with an inefficient solution, and the better algorithm you can come up with, the higher in the "best solutions" page you will be

Typically it's easiest to submit a "best solution" on a problem with a little more meat to it than this one; everyone's runtime is going to be about the same when there's not much work for the computer to do.

Compare this to a 10+ point problem where it's possible to time out with an inefficient solution, and the better algorithm you can come up with, the higher in the "best solutions" page you will be

This is due to a multitude of factors. The judge's specs have changed over time, and the time and memory measurements have become more precise (if not more accurate). If we rejudged the submissions on the best solutions page they'd likely have similar numbers to yours.
If the memory used is reporting as 64k, you can assume it's because it's from an age where it wasn't quite measured that well.

This is due to a multitude of factors. The judge's specs have changed over time, and the time and memory measurements have become more precise (if not more accurate). If we rejudged the submissions on the best solutions page they'd likely have similar numbers to yours.

If the memory used is reporting as 64k, you can assume it's because it's from an age where it wasn't quite measured that well.