#include #include using namespace std; int main() { int q,j,num,digit,sum=0; vector dig; cin>>q; for(int i=0;i>n; int a[n]; for(j=0;j>a[j]; for(j=0;j9) { num=a[j]; while(num>0) { digit=num%10; num=num/10; dig.push_back(digit);}} else dig.push_back(a[j]);} for(int i=0;i