Problem Statement | |||||||||||||
Let's call a number constitutive if it can be expressed as a sum of three or more successive positive integers. For example, 14 is a constitutive number because 14 = 2+3+4+5, but 13 is not a constitutive number. You will be given two ints A and B. Return the number of constitutive numbers between A and B, inclusive. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
| - | A will be between 1 and 1,000,000,000, inclusive. | ||||||||||||
| - | B will be between A and A + 1000, inclusive. | ||||||||||||
Examples | |||||||||||||
| 0) | |||||||||||||
| |||||||||||||
| 1) | |||||||||||||
| |||||||||||||
| 2) | |||||||||||||
| |||||||||||||
| 3) | |||||||||||||
| |||||||||||||
| 4) | |||||||||||||
| |||||||||||||