finding diamond riches formula zcpp