Used dp still answer wrong

Use long long in place of int, to avoid overflow and your code passed.