100 atcoder#ABC051B. [ABC051B] Sum of Three Integers
[ABC051B] Sum of Three Integers
Score : points
Problem Statement
You are given two integers and . Three variable and takes integer values satisfying . How many different assignments of values to and are there such that ?
Constraints
- and are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the number of the triples of and that satisfy the condition.
2 2
6
There are six triples of and that satisfy the condition:
5 15
1
The maximum value of is , achieved by one triple of and .