Sum of Three Integers
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Problem
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.
Example : 1. in
2 2
Example : 1. out
6
There are six triples of and that satisfy the condition:
Example : 2. in
5 15
Example : 2. out
1
The maximum value of is , achieved by one triple of and .