UVA 10013 - Super long sums UVA • Sep 1, 2020 Problem PDFSolution:#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ll long long #define sc scanf #define pf printf #define pi 2*acos(0.0) using namespace std; int main() { int t,k=1; cin>>t; while(t--) { int n,a,b,d=0; vectorv; vectorv1; cin>>n; for(int i=0;i>a; cin>>b; v.push_back(a+b); } for(int i=n-1,j=0;i>=0;i--) { if(v[i]>=10) { v1.push_back(v[i]%10); d=v[i]/10; v[i-1]=v[i-1]+d; d=0; } else v1.push_back(v[i]); } if(d!=0) v1.push_back(d); for(int i=v1.size()-1;i>=0;i--) cout<<""<https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10013/10013.cpp Tags UVA Competitive Programming Shipu Ahamed Recommended for you UVA UVA 913 - Joana and the Odd Numbers 4 years ago • 1 min read UVA UVA 871 - Counting Cells in a Blob 4 years ago • 3 min read UVA UVA 866 - Intersecting Line Segments 4 years ago • 3 min read