P2907 [USACO08OPEN] Roads Around The Farm S

Description

Farmer John's cows have taken an interest in exploring the territory around the farm. Initially, all N (1

Input Format

\* Line 1: Two space-separated integers: N and K

Output Format

\* Line 1: A single integer representing the number of groups of grazing cows

Explanation/Hint

There are 6 cows and the difference in group sizes is 2. There are 3 final groups (with 2, 1, and 3 cows in them). ```plain 6 / \ 2 4 / \ 1 3 ```