J1. Cupcake Party
의견: 0
A regular box of cupcakes holds 8 cupcakes, while a small box holds 3
cupcakes. There are 28 students in a class and a total of at least 28
cupcakes. Your job is to determine how many cupcakes will be left over
if each student gets one cupcake.
\(R\geq 0\)
\(S \geq 0\)
The input consists of two lines.
-
The first line contains an integer \(R\geq 0\), representing the number of
regular boxes. -
The second line contains an integer \(S \geq 0\), representing the number of small boxes.
Output the number of cupcakes that are left over.
2
53The total number of cupcakes is \(2\times8 + 5\times3\) which equals 31. Since there are 28 students, there
are 3 cupcakes left over.
2
40The total number of cupcakes is \(2\times8 + 4\times3\) which equals 28. Since there are 28 students, there
are no cupcakes left over.
평가 및 의견
J1. Cupcake Party
Log in to rate problems.
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
J1. Cupcake Party