[BOJ 24568] Cupcake Party
View as PDF
Submit solution
Points:
1
Time limit:
1.0s
Memory limit:
1G
Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text
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.</p>

입력 형식
The input consists of two lines.</p>
- The first line contains an integer R ≥ 0, representing the number of regular boxes.
- The second line contains an integer S ≥ 0, representing the number of small boxes.
Output the number of cupcakes that are left over.
예제 입력 1
2
5
예제 출력 1
3
예제 입력 2
2
4
예제 출력 2
0
Comments