为啥只有70分·?

B2001 入门测试题目

大概是没开 `long long` 吧(我不知道代码是什么)。
by BugGod @ 2023-10-28 17:52:04


记得开long long,数据范围是不小的。
by Hatsunatsu @ 2023-10-28 17:53:35


@[adjkhdhv_eber](/user/1173230)
by Hatsunatsu @ 2023-10-28 17:53:55


long long是什么东西?我刚学
by adjkhdhv_eber @ 2023-10-28 18:11:29


一种数据类型,比int范围大 @[adjkhdhv_eber](/user/1173230)
by liuzhanzhuo @ 2023-10-28 18:34:23


``` #include<bits/stdc++.h> using namespace std; int a[100005],b[100005],c[20015],jinw,n,m; int main() { string a1,b1; cin >> a1 >> b1; n = a1.length(); m = b1.length(); for(int i = n - 1;i >= 0;i--)a[n - 1 - i] = a1[i] - '0'; for(int i = m - 1;i >= 0;i--)b[m - 1 - i] = b1[i] - '0'; n = max(n,m); for(int i = 0;i < n;i++) { c[i] = a[i] + b[i] + jinw; jinw = c[i] / 10; c[i] = c[i] % 10; } if(jinw>0){ c[n++]=1; } for(int i=n-1;i>=0;i--){ cout<<c[i]; } return 0; } ```
by 09090909a @ 2023-11-02 20:58:59


@[adjkhdhv_eber](/user/1173230) 没有用long long
by xjj110626 @ 2023-11-24 16:03:18


```cpp #include<iostream> using namespace std; int main(){ long long a, b; cin >> a >> b; cout << a + b; return 0; }//就是这样 ```
by zhangzirui66 @ 2023-11-25 12:39:07


我也只有70
by 20231048049ltt @ 2023-11-30 23:13:12


十年OI一场空 不开long long见祖宗
by iostream69 @ 2023-12-10 09:46:07


| 下一页