全部评论 42

  • 看我别忘了点赞哦~

    2023-09-18 来自 浙江

    14
    • 6
      原本两三行的代码
      硬生生写到了几十行
      不愧是大佬
      (doge

      2023-09-25 来自 四川

      1
    • 就这?????????????
      #include<iostream>
      #include <algorithm>
      #include <bits/stdc++.h>
      #include <math.h>
      #include <cmath>
      #include<string>
      #include<cstring>
      #include<list>
      #include<map>
      #include<queue>
      #include<iterator>
      #include<stack>
      using namespace std;

      #define ll long long
      const int N = 1010;

      int RAND_1(ll a,ll b){
      ll n = a + b;
      return n;
      }

      int RAND_2(string a, string b, int n[500], int m[500], int ans[501]){
      for(int i = 0; i < a.size(); i++)
      n[i] = a[a.size() - i - 1] - '0';
      for(int i = 0; i < b.size(); i++)
      m[i] = b[b.size() - i - 1] - '0';
      int len_maxn = max(a.size(), b.size()) + 1;
      for(int i = 0; i < len_maxn; i++)
      {
      ans[i] = n[i] + m[i] + ans[i];
      if(ans[i] > 9)
      {
      ans[i + 1]++;
      ans[i] = ans[i] % 10;
      }
      }
      while(ans[len_maxn - 1] == 0 && len_maxn > 0) len_maxn--;
      for(int i = len_maxn - 1; i >= 0; i--) cout << ans[i];
      return 0;
      }

      int RAND_3(ll a, ll b){
      ll ans = 0;
      for(int i = 0; i < a; i ++ ) {
      ans ++;
      }
      for(int i = 0; i < b; i ++ ) {
      ans ++;
      }
      return ans;
      }

      int n[1010], m[1010],c[1010];
      int main(){
      srand(time(0));
      ll a , b;
      string z , y;
      int x;
      x = 1 + rand() % 3;
      if(x == 1){
      cin >> a >> b;
      int ans = RAND_1(a,b);
      cout << ans;
      }
      if(x == 2){
      cin >> z >> y;
      RAND_2(z , y , n , m, c);
      }
      if(x == 3){
      cin >> a >> b;
      int ans = RAND_3(a, b);
      cout << ans;
      }
      return 0;
      }

      2024-11-03 来自 广东

      2
    • (狗式点头)

      2025-01-26 来自 浙江

      0
  • 还用高精度……

    2023-09-18 来自 浙江

    2
  • 这个有意思,6

    2023-09-18 来自 浙江

    2
  • 大佬

    2026-02-15 来自 江苏

    1
  • 1周前 来自 广东

    0
  • https://www.acgo.cn/team/1996488676259516416

    2026-05-26 来自 浙江

    0
  • #include<bits/stdc++.h>
    using namespace std;
    int a[1005],b[1005],c[1005];
    int main(){
    string s1,s2;
    cin>>s1>>s2;
    bool flag=0;
    int alen=s1.length(),blen=s2.length(),clen;
    for(int i=0;i<alen;i++){
    a[i]=s1[alen-i-1]-'0';
    }
    for(int i=0;i<blen;i++){
    b[i]=s2[blen-i-1]-'0';
    }
    clen=max(alen,blen);
    for(int i=0;i<clen;i++){
    c[i]+=a[i]+b[i];
    if(c[i]>9){
    c[i+1]=1;
    c[i]%=10;
    }
    }
    if(c[clen]1) clen++;
    for(int i=0;i<clen;i++){
    if(flag
    0&&c[clen-1-i]==0) continue;
    else{
    cout<<c[clen-1-i];
    flag=1;
    }
    }
    return 0;
    }

    2026-05-23 来自 贵州

    0
  • 搞得我都懵了

    2026-04-19 来自 浙江

    0
  • 2026-04-19 来自 河北

    0
  • 方法没错

    2026-04-04 来自 浙江

    0
  • 1234

    2026-04-02 来自 浙江

    0
  • 厉害

    2026-03-28 来自 江苏

    0
  • 1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1

    2026-03-22 来自 江苏

    0
  • ?

    2026-03-19 来自 浙江

    0
  • n

    2026-03-14 来自 浙江

    0
  • ok

    2026-03-12 来自 浙江

    0
  • ok

    2026-03-12 来自 浙江

    0
  • ok

    2026-03-10 来自 浙江

    0
  • @ppl_cjdst(92134) 你会坑他吗

    2026-02-28 来自 上海

    0
  • 想的可能也太多了

    2026-02-26 来自 福建

    0
暂无数据

提交答案之后,这里将显示提交结果~

首页