English:
Diana is playing a game with two dice. One die has mm sides labelled 1,2,3,…,m.
The other die has nn sides labelled 1,2,3,…,n.
Write a program to determine how many ways can she roll the dice to get the sum 10.
For example, when the first die has 6 sides and the second die has 8 sides, there are 5 ways to get the sum 10:
The input is given as two integers. First, the user will enter in the number m (1≤m≤1000).
Second, the user will enter the number n (1≤n≤1000).
输入为两个整数。 首先,用户将输入数字m(1≤m≤1000)。
其次,用户将输入数字n(1≤n≤1000)。
There is 1 way to get the sum 10.
There is 1 way to get the sum 10.
6
8
There are 5 ways to get the sum 10.