Berba
How many ways can the following inequality be satisfied if the question marks are replaced by positive integers?
InputThe first line contains three integers B, [
] and D (1 ≤ B, C, D ≤ 1000). The second line contains two integers A1 and A2 (1 ≤ A1, A2 ≤ 1000). The third line contains two integers E1 and E2 (1 ≤ E1, E2 ≤ 1000). OutputOutput the number of ways to satisfy the inequality.
Input:
[c]3 2 4
2 7
4 5
Output:
[c]3 2 4
2 7
4 5
Output:
1Input :
5 5 5
999 1
1000 1 Output:
4Input:
1 9 7
14 5
10 3Output:
3 Submit solution
Sign in to submit a solution.