235测试点报RE,但是本地运行是正确的 求解

P1601 A+B Problem(高精)

```cpp #include <bits/stdc++.h> using namespace std; int a[520],b[520],c[520]; int main(){ int la, lb, lc = 1, x = 0; string al, bl; cin>>al>>bl; la = al.size(); lb = bl.size(); for (int i = 0;i<la;a[la-i] = al[i]-48,i++); for (int i = 0;i<lb;b[lb-i] = bl[i]-48,i++); while (lc<=la||lc<=lb){ c[lc] = a[lc]+b[lc]+x; x = c[lc]/10; c[lc]%=10; lc++; } c[lc] = x; while (c[lc]==0&&lc>1) lc--; for (int i = lc;i;i--) cout<<c[i]; return 0; } ```
by Tx1234567 @ 2023-02-11 13:41:24


|