Cupcake Party
시간 제한: 1000ms메모리 제한: 1024MB출처: CCC 2022 JuniorBOJ 24568
이 문제는 본문 이미지 일부가 표시되지 않습니다. 텍스트만으로 풀이가 어려울 수 있습니다.
문제
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.
[이미지 1]
입력
The input consists of two lines.
- 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
출력
3
예제 2
입력
2 4
출력
0
코드를 제출하려면 로그인하세요.