| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 8068 | 5559 | 5347 | 69.011% |
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.
The input consists of two lines.
Output the number of cupcakes that are left over.
2 5
3
The total number of cupcakes is 2 × 8 + 5 × 3 which equals 31. Since there are 28 students, there are 3 cupcakes left over.
2 4
0
The total number of cupcakes is 2 × 8 + 4 × 3 which equals 28. Since there are 28 students, there are no cupcakes left over.