提交时间:2024-01-18 14:29:29

运行 ID: 36938

#include<bits/stdc++.h> #include<cstring> using namespace std; int main() { int a[10000],b[10000],t[10000],i=9999; while(cin>>a[i]>>b[i]){ t[i]=a[i]+b[i]; if(t[i]>=10){ t[i]-=10; t[i-1]++; } i--; } for(int j=i;j<10000;j++){ if(t[j]==0&&j==i) continue; else cout<<t[i]; } return 0; }