#T5804. Cupcake Party

0
    ID: 1054 传统题 1000ms 128MiB 尝试: 0 已通过: 0 难度: 3 上传者: 标签>5804简单运算Junior(初级组)CCC 2022简单

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. ![image.png](https://tctm-tczx-question.obs.cn-north-4.myhuaweicloud.com/resources/question/20231012/b40009c099c748799c90cc585f9afb47)

幼儿园有 2828 个小朋友,因此需要 2828 个蛋糕。

一个大盒子可以装 88 块蛋糕,一个小盒子可以装 33 块蛋糕。现在有 nn 个大盒子和 mm 个小盒子,现在给每个小朋友一块蛋糕,问能剩下几个?

输入格式

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.

输入共两行: 第一行:包含一个整数 n≥0n≥0,表示大盒子的数量。 第二行:包含一个整数 m≥0m≥0,表示小盒子的数量。

输出格式

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.

来源

童程童美