a911: Cupcake Party
Tags :
Accepted rate : 40人/40人 ( 100% ) [非即時]
評分方式:
Tolerant

最近更新 : 2022-12-17 10:35

Content

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.

Input

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

Output the number of cupcakes that are left over.

Sample Input #1
2
5
Sample Output #1
3
Sample Input #2
2
4
Sample Output #2
0
測資資訊:
記憶體限制: 64 MB
公開 測資點#0 (14%): 1.0s , <1K
公開 測資點#1 (14%): 1.0s , <1K
公開 測資點#2 (14%): 1.0s , <1K
公開 測資點#3 (14%): 1.0s , <1K
公開 測資點#4 (14%): 1.0s , <1K
公開 測資點#5 (15%): 1.0s , <1K
公開 測資點#6 (15%): 1.0s , <1K
Hint :
Tags:
出處:
[管理者:
issin@g.puic... (冼一心老師)
]


ID User Problem Subject Hit Post Date
沒有發現任何「解題報告」