Create UVa 10487

Brute Force + Binary Search