#include using namespace std; int minimize(int); string canConstruct(int *a, int n) { // Return "Yes" or "No" denoting whether you can construct the required number. int val = 0; for(int i=0;i> t; for(int a0 = 0; a0 < t; a0++){ int n; cin >> n; int nums[n]; for(int a_i = 0; a_i < n; a_i++){ cin >> nums[a_i]; } string result = canConstruct(nums, n); cout << result << endl; } return 0; } int minimize(int number){ int pow = 1; while(number/pow) pow *=10; int total = 0; while(pow>0) { total += number/pow; number = number %pow; pow /=10; } if(total >= 10) return minimize(total); return total; }