#include #include int main() { size_t n_case, n_num; int x, tmp; std::cin >> n_case; for (size_t i = 0; i < n_case; i++) { int ans = 1; std::cin >> n_num; for (size_t j = 0; j < n_num; j++) { std::cin >> tmp; ans *= tmp + 1; } ans--; std::cout << ans << std::endl; } }