提交时间:2024-08-20 09:37:49

运行 ID: 168319

#include<bits/stdc++.h> using namespace std; int a[110],b[110]; int main() { int n,sum = 0,cnt = 1; cin >> n; for(int i = 1;i <= n;i++) { cin >> a[i] >> b[i]; } for(int i = n;i >= 1;i--) { sum = sum + (a[i] + b[i]) * cnt; cnt *= 10; } cout << sum; return 0; }