#T5804. Cupcake Party
0
Cupcake Party
Cupcake Party
题目描述
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. • The first line contains an integer n ≥ 0, representing the number of regular boxes. • The second line contains an integer m ≥ 0, representing the number of small boxes.输入共两行: 第一行:包含一个整数 ,表示大盒子的数量。 第二行:包含一个整数 ,表示小盒子的数量。
输出格式
Output the number of cupcakes that are left over. 一行,表示剩余蛋糕的数量。2
5
3
2
4
0
提示
#### 数据范围与提示 对于全部数据:$0\le n,m\le100$ #### 样例解释 Explanation of Output for Sample Input 1 The total number of cupcakes is 2 × 8 + 5 × 3 which equals 31. Since there are 28 students, there are 3 cupcakes left over.Explanation of Output for Sample Input 2 The total number of cupcakes is 2 × 8 + 4 × 3 which equals 28. Since there are 28 students, there are no cupcakes left over.