BST DivisorsPower from Topcoder SRM 628 (Division I)