#P127. [KSC004A] 2A+2B Problem
[KSC004A] 2A+2B Problem
Source
This problem is adapted from Long Long OJ. All rights reserved.
Problem Description
Little A has two sticks of length and little B has two sticks of length .
Determine how many distinct lengths can be formed by combining their sticks (not all sticks need to be used).
Input Format
One line containing two non-negative integers and , separated by a space.
Output Format
The number of distinct lengths that can be formed using the four sticks (not all need to be used).
Samples
2 2
5
2 3
9
Sample 2 Explanation
Possible lengths formed: .
Data Range
.