#P8400. [CCC 2022 J1] Cupcake Party

[CCC 2022 J1] Cupcake Party

Problem Description

There are 2828 children in the kindergarten, so 2828 cupcakes are needed.

A large box can hold 88 cupcakes, and a small box can hold 33 cupcakes. Now there are nn large boxes and mm small boxes. If each child gets one cupcake, how many cupcakes will be left?

Input Format

One line with two integers n,mn, m, with the meaning given in the problem description.

Output Format

One line containing the number of leftover cupcakes.

2 5
3
2 4
0

Hint

For all testdata: 0n,m1000 \le n, m \le 100.

Translated by ChatGPT 5