题解

1323 条题解

  • 16
    @ 2018-05-01 16:13:03

    告诉你们什么叫做暴力的题解。

    #include<bits/stdc++.h>
    #define gou int main()
    #define li {
    #define guo int a,b;
    #define jia cin>>a>>b;
    #define sheng cout<<a+b;
    #define si return 0;
    #define yi }
    using namespace std;
    gou
    li
    guo
    jia
    sheng
    si
    yi
    
    • @ 2018-05-01 22:51:50

      #include<bits/stdc++.h>
      #define qi int main()
      #define yin
      {
      #define huo int a,b;
      #define fu cin>>a>>b;
      #define bi cout<<a+b;
      #define qu return 0;
      #define zhi
      }
      using namespace std;
      qi
      yin
      huo
      fu
      bi
      qu
      zhi

    • @ 2019-07-11 18:13:13

      学习了

    • @ 2020-05-18 20:07:53

      zzmg,jbl(

    • @ 2021-08-29 18:54:26

      你是秀儿

    • @ 2022-02-27 13:37:34

      @Louisssss: 太秀了

  • 9
    @ 2021-08-30 11:48:08

    本题直接用 int 就能过。
    完整代码:

    #include<iostream> //引入 iostream 头文件
    using namespace std; //使用 std 命名空间
    int main(){ //主函数,程序从这里开始
        int a,b; //定义两个变量,一个叫 a ,一个叫 b
        cin>>a>>b; //输入
        cout<<a+b; //输出他们的和
        return 0; //主函数应返回 0
    }
    

    讲解:
    - iostream 头文件也叫输入输出流,是 C++ 特有的头文件,用来输入和输出。
    - std 命名空间是 C++ 的标准命名空间,输入输出就定义在这里面。
    - int main() 函数是程序的开始,一个程序必须有他。
    - int a,b 是定义了两个 int 型变量,\(a\) 和 \(b\)。
    - cin>>a>>b 是在输入 \(a\) 和 \(b\)。
    - cout<<a+b 是在输出 \(a+b\)。
    - return 0int main() 函数的返回值,这个返回值必须是 \(0\) ,不然会 RE。

    管理员大大求通过
    看在我写得这么认真的情况下,就给我点个赞吧

  • 6
    @ 2023-10-07 23:22:21
    /********************************************************
    备注:
    ********************************************************/
    #include <iostream>
    #include <iomanip>
    #include <cmath>
    #include <cstring>
    #include <algorithm>
    #include <cstdio>
    using namespace std;
    #define LL long long
    #define MAXM 3010
    #define MAXN 3010
    const int N =1e5+10;
    const int INF =0x3f3f3f3f;
    int main ()
    {
        int a,b;
        cin>>a>>b;
        cout<<a+b;
       return 0;
    }
    
  • 2
    @ 2023-05-15 19:08:30

    这题比较难
    #include<iostream>
    using namespace std;
    int main()
    {
    int m,n;
    cin>>m>>n;
    cout<<m*m*m*m*m/m/m/m/m+n*n*n*n*n/n/n/n/n;
    }

  • 1
    @ 2024-10-28 09:36:20

    想要更简单做法请移步至其他题解。

    本题有一种好想但码量较大的做法,可以直接将问题转化为网络流模型,跑一边最大流就可以了。为防止 TLE 特地学习了一遍预流推进。

    #include<bits/stdc++.h>
    using namespace std;
    const int N=2e4+5,M=2e5+5,inf=0x3f3f3f3f;
    int n,s,t,tot;
    int v[M<<1],w[M<<1],first[N],nxt[M<<1];
    int h[N],e[N],gap[N<<1],inq[N];
    struct cmp
    {
        inline bool operator()(int a,int b) const
        {
            return h[a]<h[b];
        }
    };
    queue<int> Q;
    priority_queue<int,vector<int>,cmp> pQ;
    inline void add_edge(int from,int to,int flow)
    {
        tot+=2;
        v[tot+1]=from;v[tot]=to;w[tot]=flow;w[tot+1]=0;
        nxt[tot]=first[from];first[from]=tot;
        nxt[tot+1]=first[to];first[to]=tot+1;
        return;
    }
    inline bool bfs()
    {
        int now;
        int go;
        memset(h+1,0x3f,sizeof(int)*n);
        h[t]=0;Q.push(t);
        while(!Q.empty())
        {
            now=Q.front();Q.pop();
            for(go=first[now];go;go=nxt[go])
                if(w[go^1]&&h[v[go]]>h[now]+1)
                    h[v[go]]=h[now]+1,Q.push(v[go]);
        }
        return h[s]!=inf;
    }
    inline void push(int now)
    {
        int d;
        int go;
        for(go=first[now];go;go=nxt[go])
            if(w[go]&&h[v[go]]+1==h[now])
            {
                d=min(e[now],w[go]);
                w[go]-=d;w[go^1]+=d;e[now]-=d;e[v[go]]+=d;
                if(v[go]!=s&&v[go]!=t&&!inq[v[go]])
                    pQ.push(v[go]),inq[v[go]]=1;
                if(!e[now])
                    break;
            }
        return;
    }
    inline void relabel(int now)
    {
        int go;
        h[now]=inf;
        for(go=first[now];go;go=nxt[go])
            if(w[go]&&h[v[go]]+1<h[now])
                h[now]=h[v[go]]+1;
        return;
    }
    inline int hlpp()
    {
        int now,d;
        register int i,go;
        if(!bfs())
            return 0;
        h[s]=n;
        memset(gap,0,sizeof(int)*(n<<1));
        for(i=1;i<=n;i++)
            if(h[i]<inf)
                ++gap[h[i]];
        for(go=first[s];go;go=nxt[go])
            if(d=w[go])
            {
                w[go]-=d;w[go^1]+=d;e[s]-=d;e[v[go]]+=d;
                if(v[go]!=s&&v[go]!=t&&!inq[v[go]])
                    pQ.push(v[go]),inq[v[go]]=1;
            }
        while(!pQ.empty())
        {
            inq[now=pQ.top()]=0;pQ.pop();push(now);
            if(e[now])
            {
                if(!--gap[h[now]])
                    for(i=1;i<=n;i++)
                        if(i!=s&&i!=t&&h[i]>h[now]&&h[i]<n+1)
                            h[i]=n+1;
                relabel(now);++gap[h[now]];
                pQ.push(now);inq[now]=1;
            }
        }
        return e[t];
    }
    int m;
    signed main()
    {
        int x,y;
        cin>>x>>y;
        n=4,m=4,s=1,t=4;
        add_edge(1,2,x);
        add_edge(1,3,y);
        add_edge(2,4,10000000);
        add_edge(3,4,10000000);
        printf("%d\n",hlpp());
        return 0;
    }
    
  • 1
    @ 2024-10-24 14:24:10
    #include<iostream>
    using namespace std;
    int main() {
        int a,b;
        cin >> a >> b;
        cout << a + b;
        return 0;
    }
    
  • 1
    @ 2024-08-27 19:43:03

    C++基本格式

    #include <iostream>
    using namespace std;
    int main(void) {
        return 0;
    }
    

    在第3行后面添加代码。

    int a, b;//定义两个变量a和b
    cin >> a >> b;//输入a和b
    cout << a + b;//计算a + b并把结果输出
    

    点个赞再走呗,跪谢!ヾ(≧▽≦*)o

  • 1
    @ 2024-03-21 20:45:30
    main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b);}
    
    
  • 1
    @ 2024-03-21 20:42:40
    
    #include<bits/stdc++.h>
    typedef long long ll;
    using namespace std;
    template<class T> void read(T &x) {
        x = 0; T f = 1; char c = getchar();
        for (; !isdigit(c); c = getchar()) if (c == '-') f = -1;
        for (; isdigit(c); c = getchar()) x = (x << 3) + (x << 1) + c - 48; x *= f;
    }
    template<class T> void write(T x) {
        if (x > 9) write(x / 10); putchar(x % 10 + 48);
    }
    template<class T> void print(T x, char ed = '\n') {
        if (x < 0) putchar('-'), x = -x; write(x), putchar(ed);
    }//抄来的快读快写
    int main(){
        ll a,b;
        read(a);
        read(b);
        print(a+b);
        return 0;
    }
    
    
  • 1
    @ 2024-01-15 16:21:10
    #include<iostream>
    #include<cstdio>
    #include<bits/stdc++.h>
    #include<windows.h>
    #include "windows.h"
    #include<cstring>
    #include<conio.h>
    #include<stdio.h>/*
    using namespace std;
    //    cout << "Ô­É«testCOLOR£¨Ã»ÓÐÉèÖÃ×ÖÌåÑÕÉ«£©" << endl;
    //    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);//ÉèÖÃÈýÉ«Ïà¼Ó
    //    cout << "°×É«testCOLOR£¨ºìÉ«ÂÌÉ«À¶É«Ïà¼Ó£©" << endl;
    //    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);//ÉèÖúìÉ«
    //    cout << "ºìÉ«testCOLOR£¨ÉèÖõÄÑÕɫΪºìÉ«£©" << endl;
    //    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN);//ÉèÖÃÂÌÉ«
    //    cout << "ÂÌÉ«testCOLOR£¨ÉèÖõÄÑÕɫΪÂÌÉ«£©" << endl;
    //    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_BLUE);//ÉèÖÃÀ¶É«
    //    cout << "À¶É«testCOLOR£¨ÉèÖõÄÑÕɫΪÀ¶É«£©" << endl;
    //    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);//ÉèÖúìÉ«ºÍÂÌÉ«Ïà¼Ó
    //    cout << "»ÆÉ«testCOLOR£¨ºìÉ«ºÍÂÌÉ«Ïà¼ÓÉ«£©" << endl;
    //    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);//ÉèÖúìÉ«ºÍÀ¶É«Ïà¼Ó
    //    cout << "·ÛÉ«testCOLOR£¨ºìÉ«ºÍÀ¶É«Ïà¼ÓÉ«£©" << endl;
    //    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN |FOREGROUND_BLUE);//ÉèÖÃÂÌÉ«ºÍÀ¶É«Ïà¼Ó
    //    cout << "ÇàÉ«testCOLOR£¨ÂÌÉ«ºÍÀ¶É«Ïà¼ÓÉ«£©" << endl;
    //    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY);//ÉèÖÃÑÕÉ«£¬Ã»ÓÐÌí¼ÓÑÕÉ«£¬¹ÊΪԭɫ
    using namespace std;
    string kjl="    ---------------------------------------------The Way Of The Brave";
    string slsf="---------------------------------------------    ";
    int yao=0,jg=0,jf=0,guais,gongs,fangzhi,shengm=20,b,c=0,o;
    int gongj,fangj,sheng=20,gong=10,fang=10,guaig,fangfan,renbao=0;
    int hlf=0,skf=0,tlf=0,hl=0,sk=0,tl=0,m=0,qie=0,guaigs,mo=0;
    int sui(int min,int max){
    int a;
    srand(time(NULL));
    a=(rand()%(max-min+min))+min;
    return a;
    }
    /*suiº¯ÊýÓ÷¨int main(){
    int mi,ma;
    scanf("%d%d",&mi,&ma);
    int r=sui(mi,ma);
    cout<<r;
    }*//*
    int gongjh(){
    hlf=hl;
    skf=sk;
    tlf=tl;
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN);
    fangzhi=c;
    while(guais>0&&sheng>0){
        if(qie==1)
            guaig=sui(4+10*m,2);
        else
            guaig=sui(guaigs-2+10*m,4);
        gongs=sui(gong-2,4);
        if(renbao==1){
            renbao=0;
            gongs*=3;
        }
        printf("\n");
        printf("------------------------------\n");
        printf("¹ÖÎïÉúÃü: %d\n",guais);
        printf("¹ÖÎï¹¥»÷: %d--%d\n",guaigs-2+10*m,guaigs+2+10*m);
        printf("------------------------------\n");
        cout<<"1.¹¥»÷"<<endl; 
        if(fangzhi!=0) cout<<"2.·ÀÓù£¨´ÎÊý"<<fangzhi<<"£©"<<endl;
        cout<<"3.à¾Ò©£¨ÉÁ±Ü£©"<<endl;
        if(hlf>0||tlf>0||skf>0)cout<<"4.·¨ÕÈ"<<endl;
        cout<<endl;
        b=_getch()-'0';
        if(b==1){
            guais=guais-gongs;
            sheng=sheng-guaig;
            cout<<"¹ÖÎïÉúÃü"<<"-"<<gongs<<"="<<guais<<endl;
            cout<<"×ÔÉíÉúÃü"<<"-"<<guaig<<"="<<sheng<<endl;
        }
        if(b==2&&fangzhi!=0){
            if(fang>=guaig){
                if(fang-guaig>fangfan){
                    guais=guais-fangfan;
                    cout<<"¹ÖÎïÉúÃü"<<"-"<<fangfan<<"="<<guais<<endl;
                }
                else{
                    guais=guais-fang+guaig;
                    cout<<"¹ÖÎïÉúÃü"<<"-"<<fang-guaig<<"="<<guais<<endl;
                }
            }
            else{
                sheng=sheng-(guaig-fang);
                cout<<"×ÔÉíÉúÃü"<<"-"<<guaig-fang<<"="<<sheng<<endl;
            }
            fangzhi--;
        }
        if(b==3){
            cout<<"1.»Ö¸´ÁéÒ©"<<endl; 
            cout<<"2.ÊÈѪҩ¼Á"<<endl;
            cout<<"3.¸ÖÌúºÏ¼Á"<<endl;
            b=_getch()-'0';
            if(b==1&&yao>=1){
                yao--;
                sheng=sheng+20;
                if(sheng>shengm)sheng=shengm;
                cout<<"ÁéÒ©ÊýÁ¿"<<yao<<endl;
                cout<<"×ÔÉíÉúÃü+20£¨"<<sheng<<"£©"<<endl;
            }
            if(b==1&&yao==0) printf("ÎÞ¿ÉÓÃÒ©¼Á£¡\n"); 
            if(b==2&&jg>=1){
                jg--;
                gong++;
                sheng-=guaig/10;
                cout<<"×ÔÉíÉúÃü"<<"-"<<guaig/10<<"="<<sheng<<endl;
                cout<<"Ò©¼ÁÊýÁ¿"<<jg<<endl;
                cout<<"×ÔÉí¹¥»÷+1£¨"<<gong<<"£©"<<endl;
            }
            if(b==2&&jg==0) printf("ÎÞ¿ÉÓÃÒ©¼Á£¡\n"); 
            if(b==3&&jf>=1){
                jf--;
                fang++;
                sheng-=guaig/10;
                cout<<"×ÔÉíÉúÃü"<<"-"<<guaig/10<<"="<<sheng<<endl;
                cout<<"ºÏ¼ÁÊýÁ¿"<<jf<<endl;
                cout<<"×ÔÉí·ÀÓù+1£¨"<<fang<<"£©"<<endl;
            }
            if(b==3&&jf==0) printf("ÎÞ¿ÉÓÃÒ©¼Á£¡\n"); 
        }
        if(b==4){
            if(hlf>0)cout<<"1.»ØÂÖ5000£¨·´ÉË£© ¼ÛÖµ£º100"<<endl;
            if(skf>0)cout<<"2.ʱ¿ÕÕÛµþÆ÷£¨·ÀÓùÖµ»ØÂú£© ¼ÛÖµ100"<<endl;
            if(tlf>0)cout<<"3.ħÍõµÄͷ­£¨Ï´ÎÉ˺¦ÓµÓб©»÷£© ¼ÛÖµ200"<<endl;
            b=_getch()-'0';
            if(b==1&&hlf>=1){
                hlf--;
                printf("·´µ¯É˺¦£¡");
                cout<<"×ÔÉíÉúÃü"<<"-"<<guaig/10<<"="<<sheng<<endl;
                cout<<"»ØÂÖ´ÎÊý"<<hlf<<endl;
                guais=guais-guaig;
                cout<<"¹ÖÎïÉúÃü-"<<guaig<<"="<<guais<<endl;
            }
            if(b==1&&hlf==0) printf("ÎÞ¿ÉÓ÷¨ÕÈ£¡\n"); 
            if(b==2&&skf>=1){
                skf--;
                printf("ʱ¿Õµ¹Á÷£¡");
                fangzhi=c;
                cout<<"×ÔÉí·ÀÓù´ÎÊý»Ö¸´"<<"="<<fangzhi<<endl;
                cout<<"ʱ¿ÕÊýÁ¿"<<"="<<skf<<endl;
            }
            if(b==2&&skf==0) printf("ÎÞ¿ÉÓ÷¨ÕÈ£¡\n"); 
            if(b==3&&tlf>=1){
                tlf--;
                renbao=1;
                cout<<"Ï´ι¥»÷½«»á±©»÷"<<endl;
                cout<<"ͷ­ʹÓÃÊýÁ¿"<<tlf<<endl;
            }
            if(b==3&&jf==0) printf("ÎÞ¿ÉÓ÷¨ÕÈ£¡\n"); 
        }
        if(fangzhi==0){
            printf("·ÀÓù´ÎÊýÒÑÓþ¡\n");
        }
        if(sheng<=0){
            SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
            cout<<"ÄãËÀÁË"<<endl;
            Sleep(1000);
            cout<<"ÇëÈ¥É̵겹ѪºóÔÙÕ½¶·"<<endl;
            Sleep(1000);
            cout<<"¸´»îÖÐ";
            for(int i=1;i<=5;i++){
                printf(".");
                Sleep(500);
            }
            printf("\n");
            break;
        }
    }
    }
    /*Õ½¶·º¯Êý 
    ½øÈ뺯Êý
    gonhjh£¨¹ÖÉú£¬¹Ö¹¥£¬ÉúÃü£¬¹¥»÷£¬·ÀÓù£¬»Ö¸´ÁéÒ©£¬ÊÈѪҩ¼Á£¬¸ÖÌúºÏ¼Á£¬ÉúÃüÉÏÏÞ£©
    int guais,int guaig,int sheng,int gong,int fang,int yao,int jg,int jf,int shengm)
    */ 
    int main(){/*
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
    cout<<"ÄãÊÇһλÓÂÕߣ¬"<<endl;
    Sleep(2000);
    cout<<"ÓÐÒ»ÌìÄãÌý¼ûÁËħÍõµÄÅ­ºð£¬"<<endl;
    Sleep(2000);
    cout<<"ÓÚÊÇÄã̤ÉÏÁË´ò°ÜħÍõµÄÕ÷³Ì¡£"<<endl;
    Sleep(2500); 
    system("CLS");
    system("color F0"); 
    cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
    for(int i=0;i<=68;i++){
        printf("%c",kjl[i]);
        Sleep(90);
    }
    for(int i=0;i<=48;i++){
        printf("%c",slsf[i]);
        Sleep(90);
    }
    system("color 07"); 
    cout<<""<<endl;
    Sleep(2500); 
    system("CLS");
    printf("ÇëÉÔºó");
        for(int i=1;i<=5;i++){
            printf(".");
            Sleep(200);
        }
    printf("\n");
    int a=0,b,qian01,laotou=0;
    int qian=0,bao,muwu;
    while(a==0){
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);
        cout<<"1.ÓÂÕßÉ̵ê"<<endl; 
        cout<<"2.ÌÖ·¥Ä§Îï"<<endl;
        cout<<"3.½ÇÉ«×ÊÁÏ"<<endl;
        cout<<"ÇëÑ¡Ôñ..."<<endl;
        cout<<endl;
        b=_getch()-'0';
        if(b==1){
            system("CLS");
            SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
            printf("ÇëÉÔºó");
            for(int i=1;i<=5;i++){
                printf(".");
                Sleep(200);
                }
            printf("\n");
            cout<<"1.×°±¸"<<endl; 
            cout<<"2.Ò©Æ·"<<endl;
            cout<<"ÊäÈë0Í˳ö"<<endl;
            cout<<endl;
            b=_getch()-'0';
            if(b==1){
                system("CLS");
                while(b!=0){
                    printf("ÇëÉÔºó");
                    for(int i=1;i<=5;i++){
                        printf(".");
                        Sleep(200);
                    }
                    printf("\n");
                    cout<<"1.ÎäÆ÷"<<endl;
                    cout<<"2.¶ÜÅÆ"<<endl;
                    cout<<"3.¿ø¼×"<<endl;
                    cout<<"4.·¨ÕÈ"<<endl;
                    if(m>0)cout<<"5.Á¶»¯"<<endl;
                    cout<<"(×°±¸²»¿ÉÖظ´¹ºÂò£©"<<endl;
                    cout<<"ÊäÈë0Í˳ö"<<endl;
                    cout<<endl;
                    b=_getch()-'0';
                    if(b==1){
                        system("CLS");
                        printf("ÇëÉÔºó");
                        for(int i=1;i<=5;i++){
                            printf(".");
                            Sleep(200);
                        }
                        printf("\n");
                        cout<<"1.ÆïÊ¿³¤½££¨+10£© ¼ÛÖµ£º20"<<endl;
                        cout<<"2.ʯÖн££¨+20£© ¼ÛÖµ40"<<endl;
                        if(m>0)cout<<"3.ħÍõµÄÓÒÊÖ£¨+90£© ¼ÛÖµ150"<<endl;
                        cout<<"ÊäÈë6Í˳ö"<<endl;
                        cout<<endl;
                        b=_getch()-'0';
                        if(b==1){
                            system("CLS");
                            if(qian<20)
                                printf("½ð±Ò²»×ã\n");
                            else{
                            gong=20;
                            qian-=20;
                            cout<<"×ÔÉí¹¥»÷"<<gong<<endl;
                            }
                        }
                        if(b==2){
                            system("CLS");
                            if(qian<40)
                                printf("½ð±Ò²»×ã\n");
                            else{
                            gong=30;
                            qian-=40;
                            cout<<"×ÔÉí¹¥»÷"<<gong<<endl;
                            }
                        }
                        if(b==3&&m>0){
                            system("CLS");
                            if(qian<150)
                                printf("½ð±Ò²»×ã\n");
                            else{
                            gong=100;
                            qian-=150;
                            cout<<"×ÔÉí¹¥»÷"<<gong<<endl;
                            mo=1;
                            }
                        }
                        b=0;
                    }
                    if(b==2){
                        system("CLS");
                        printf("ÇëÉÔºó");
                        for(int i=1;i<=5;i++){
                            printf(".");
                            Sleep(200);
                        }
                        printf("\n");
                        cout<<"1.»Ê¼Ò¶ÜÅÆ£¨+10£© ¼ÛÖµ£º20"<<endl;
                        cout<<"2.ÓÀºã±¤ÀÝ£¨+20£© ¼ÛÖµ40"<<endl;
                        if(m>0)cout<<"3.ħÍõµÄ×óÊÖ£¨+90£© ¼ÛÖµ150"<<endl;
                        cout<<"ÊäÈë6Í˳ö"<<endl;
                        cout<<endl;
                        b=_getch()-'0';
                        if(b==1){
                            system("CLS");
                            if(qian<20)
                                printf("½ð±Ò²»×ã\n");
                            else{
                            fang=20;
                            qian-=20;
                            cout<<"×ÔÉí·ÀÓù"<<fang<<endl;
                            } 
    
                        }
                        if(b==2){
                            system("CLS");
                            if(qian<40)
                                printf("½ð±Ò²»×ã\n");
                            else{
                            fang=30;
                            qian-=40;
                            cout<<"×ÔÉí·ÀÓù"<<fang<<endl;
                            } 
                        }
                        if(b==3&&m>0){
                            system("CLS");
                            if(qian<150)
                                printf("½ð±Ò²»×ã\n");
                            else{
                            fang=100;
                            qian-=150;
                            cout<<"×ÔÉí·ÀÓù"<<fang<<endl;
                            mo=1;
                            } 
                        }
                    }
                    if(b==3){
                        system("CLS");
                        printf("ÇëÉÔºó");
                        for(int i=1;i<=5;i++){
                            printf(".");
                            Sleep(200);
                        }
                        printf("\n");
                        cout<<"1.Õ½Õù¿ø¼×£¨+10£© ¼ÛÖµ£º20"<<endl;
                        cout<<"2.²»ÃðÁú¼×£¨+20£© ¼ÛÖµ40"<<endl;
                        if(m>0)cout<<"3.ħÍõµÄ¾«»ª£¨+90£© ¼ÛÖµ150"<<endl;
                        cout<<"ÊäÈë6Í˳ö"<<endl;
                        cout<<endl;
                        b=_getch()-'0';
                        if(b==1){
                            system("CLS");
                            if(qian<20)
                                printf("½ð±Ò²»×ã\n");
                            else{
                            shengm=30;
                            qian-=20;
                            cout<<"×ÔÉíÉúÃüÉÏÏÞ"<<shengm<<endl;
                            }
                        }
                        if(b==2){
                            system("CLS");
                            if(qian<40)
                                printf("½ð±Ò²»×ã\n");
                            else{
                                shengm=40;
                                qian-=40;
                                cout<<"×ÔÉíÉúÃüÉÏÏÞ"<<shengm<<endl;
                            }
                        }
                        if(b==3&&qian>=150&&m>0){
                            system("CLS");
                            if(qian<150)
                                printf("½ð±Ò²»×ã\n");
                            else{
                                shengm=110;
                                qian-=150;
                                cout<<"×ÔÉíÉúÃüÉÏÏÞ"<<shengm<<endl;
                                mo=1;
                            }
                        }
                    }
                    if(b==4){
                        system("CLS");
                        printf("ÇëÉÔºó");
                        for(int i=1;i<=5;i++){
                            printf(".");
                            Sleep(200);
                        }
                        printf("\n");
                        cout<<"1.»ØÂÖ5000£¨·´ÉË£© ¼ÛÖµ£º100"<<endl;
                        cout<<"2.ʱ¿ÕÕÛµþÆ÷£¨·ÀÓùÖµ»ØÂú£© ¼ÛÖµ100"<<endl;
                        if(m>0)cout<<"3.ħÍõµÄͷ­£¨Ï´ÎÉ˺¦ÓµÓб©»÷£© ¼ÛÖµ200"<<endl;
                        cout<<"ÊäÈë6Í˳ö"<<endl;
                        cout<<endl;
                        b=_getch()-'0';
                        if(b==1){
                            system("CLS");
                            if(qian<20)
                                printf("½ð±Ò²»×ã\n");
                            else{
                                hl=1;
                                printf("¹ºÂò³É¹¦\n");
                            }
                        }
                        if(b==2){
                            system("CLS");
                            if(qian<40)
                                printf("½ð±Ò²»×ã\n");
                            else{
                                sk=1;
                                printf("¹ºÂò³É¹¦\n");
                            }
                        }
                        if(b==3&&qian>=150&&m>0){
                            system("CLS");
                            mo=1;
                            if(qian<150)
                                printf("½ð±Ò²»×ã\n");
                            else{
                                tl=1;
                                printf("¹ºÂò³É¹¦\n");
                            }
                        }
                    }
                    if(b==5&&m>0){
                        system("CLS");
                        printf("ÇëÉÔºó");
                        for(int i=1;i<=5;i++){
                            printf(".");
                            Sleep(200);
                        }
                        printf("\n");
                        cout<<"1.Á¶»¯ÎäÆ÷£¨+10£© ¼ÛÖµ50"<<endl;
                        cout<<"2.Á¶»¯¶ÜÅÆ£¨+10£© ¼ÛÖµ50"<<endl;
                        cout<<"3.Á¶»¯¿ø¼×£¨+10£© ¼ÛÖµ50"<<endl;
                        cout<<"ÊäÈë6Í˳ö"<<endl;
                        b=_getch()-'0';
                        if(b==1){
                            system("CLS");
                            if(qian<50)
                                printf("½ð±Ò²»×ã\n");
                            else{
                                gong+=10;
                                qian-=50;
                                cout<<"×ÔÉí¹¥»÷"<<gong<<endl;
                            }
                        }
                        if(b==2){
                            system("CLS");
                            if(qian<50)
                                printf("½ð±Ò²»×ã\n");
                            else{
                                fang+=10;
                                qian-=50;
                                cout<<"×ÔÉí·ÀÓù"<<fang<<endl;
                            }
                        }
                        if(b==3){
                            system("CLS");
                            if(qian<50)
                                printf("½ð±Ò²»×ã\n");
                            else{
                                shengm+=10;
                                qian-=50;
                                cout<<"×ÔÉíÉúÃüÉÏÏÞ"<<shengm<<endl;
                            }
                        }
                    } 
                }
            }
            if(b==2){
                system("CLS");
                printf("ÇëÉÔºó");
                for(int i=1;i<=5;i++){
                    printf(".");
                        Sleep(200);
                }
                printf("\n");
                cout<<"1.¿ìËٻظ´£¨»¨·Ñ1£©"<<endl;
                cout<<"2.»Ö¸´ÁéÒ©£¨»¨·Ñ5£©*5"<<endl;
                cout<<"3.ÊÈѪҩ¼Á£¨»¨·Ñ5£©*5"<<endl;
                cout<<"2.¸ÖÌúºÏ¼Á£¨»¨·Ñ5£©*5"<<endl;
                cout<<"ÊäÈë0Í˳ö"<<endl;
                cout<<endl;
                b=_getch()-'0';
                if(b==1&&qian>=1){
                    system("CLS");
                    sheng=shengm;
                    qian--;
                    cout<<"×ÔÉíÉúÃü"<<sheng<<endl;
                }
                if(b==2&&qian>=5){
                    system("CLS");
                    yao=yao+5;
                    cout<<"»Ö¸´ÁéÒ©ÊýÁ¿"<<yao<<endl;
                    qian-=5;
                }
                if(b==3&&qian>=5){
                    system("CLS");
                    jg=jg+5;
                    cout<<"ÊÈѪҩ¼ÁÊýÁ¿"<<jg<<endl;
                    qian-=5;
                }
                if(b==4&&qian>=5){
                    system("CLS");
                    jf=jf+5;
                    cout<<"¸ÖÌúºÏ¼ÁÊýÁ¿"<<jf<<endl;
                    qian-=5;
                }
            }
        }
        else if(b==2&&sheng>0){
            system("CLS");
            printf("̽Ë÷ÖÐ");
            for(int i=1;i<=5;i++){
                printf(".");
                Sleep(200); 
            }
            cout<<endl;
            o=sui(1,99);
            if(o>=1&&o<=7&&laotou==0){
                system("CLS");
                laotou=1;
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
                printf("ÄãÓöµ½Ò»¸ö¿´ÆðÀ´¼¢³¦ê¤ê¤µÄÀÏÍ·\n");
                Sleep(500);
                printf("ËûÎÊÄãÊÇ·ñ¿ÉÒÔ¸øËûһЩǮ\n");
                for(int i=1;i<=5;i++){
                    printf(".");
                    Sleep(200);
                }
                printf("ÇëÑ¡Ôñ\n");
                Sleep(500);
                if(qian>=5){ 
                    printf("1.¸øÓè     2.ËãÁË°É\n");
                    b=_getch()-'0';
                }
                else{ 
                    printf("1.½ð±Ò²»¹»ËãÁË°É\n");
                    b=2;
                }
                if(b==1){
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    qian-=5;
                    printf("½ð±Ò-5=%d\n",qian);
                    yao+=5;
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
                    printf("¡°Ð»Ð»Ä㣬С»ï×Ó¡£¡±\n");
                    Sleep(500);
                    printf("¡°ÕâÀïÓÐÎÒÕä²ØµÄ»Ö¸´Ò©¼Á£¬¡±\n");
                    Sleep(500);
                    printf("¡°ÎÒÒѾ­»îÁ˺ܾÃÁË£¬¡±\n");
                    Sleep(500);
                    printf("¡°¹À¼ÆÒ²Óò»ÉÏÕâ¸ö¶«Î÷ÁË¡£¡±\n");
                    Sleep(500);
                    printf("¡°ÄÃÈ¥°É¡±\n");
                    Sleep(500);
                    printf("»Ö¸´ÁéÒ©+5\n");
                    Sleep(500);
                    printf("¡°ÕâЩ¶¼ÊÇÒÔÇ°µÄÓÂÕ߸øÎҵġ±\n");
                    Sleep(500);
                    printf("¡°µ«ÊÇËûÃÇûÓÐÒ»¸öÈË»ØÀ´¡±\n");
                    Sleep(500);
                    printf("¡°Ä꼶ÇáÇáµÄ£¬Äã»ØÈ¥°É¡±\n");
                    Sleep(500);
                }
                if(b==2){
                    printf("ËûËÀÔÚÁËÄãµÄÃæÇ°\n");
                    Sleep(500);
                    printf("Á³ÉÏ»¹²ÐÁô×ŶÔÕâ¸öÊÀ½çµÄ¾øÍû\n");
                    Sleep(500);
                    printf("ËûËÀÓÚ¼¢¶öÓëÀäÄ®µÄË«ÖØ´ò»÷\n");
                    Sleep(500);
                    printf("ÄãÐÄÇéºÜ¸´ÔÓ\n");
                    Sleep(500);
                    printf("ɤ×ÓºÃÏñ±»Ò»¿é¾Þʯ¿¨×¡\n");
                    Sleep(500);
                    printf("¾«ÉñÉϵÄѹÁ¦ÈÃÄã²»ÄܺôÎü\n");
                    Sleep(500);
                    printf("Ä㻨ÁËЩǮΪËûÖðìÁËÒ»³¡¼òµ¥µÄÔáÀñ\n");
                    Sleep(500);
                    qian-=10;
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    printf("½ð±Ò-10=%d",qian);
                    Sleep(500);
                }
            }
            if(o>=8&&o<=15){
                printf("ÄãÓöµ½ÁËÒ»¸öСÄк¢\n");
                Sleep(500);
                printf("¡°¿ÉÒÔ¸øÎÒ3Æ¿¸ÖÌúºÏ¼ÁÂ𣿡±\n");
                Sleep(500);
                printf("¡°ÎªÊ²Ã´£¿£¿£¿¡±\n");
                Sleep(500);
                printf("ÎÒҪȥÏûÃðÕâÌõ·ÉϵÄÒ»¸ö¹ÖÎï\n");
                Sleep(500);
                printf("ÒªÏàÐÅËûÂð£¿\n");
                Sleep(500);
                for(int i=1;i<=5;i++){
                    printf(".");
                    Sleep(200);
                }
                printf("ÇëÑ¡Ôñ\n");
                if(jf>=3){ 
                    printf("1.¼ÓÓÍ£¡     2.ËãÁË°É\n");
                    b=_getch()-'0';
                }
                else{ 
                    printf("1.ºÏ¼Á²»¹»ËãÁË°É\n");
                    b=2;
                }
                if(b==1){
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    jf-=3;
                    printf("¸ÖÌúºÏ¼Á-3%d\n",jf);
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
                    printf("¡°Ð»Ð»£¡¡±\n");
                    Sleep(500);
                    printf("¹ýÁËÒ»»á¶ù");
                    for(int i=1;i<=5;i++){
                    printf(".");
                    Sleep(200);
                    }
                    printf("\n ¡°¸ø£¬5¸ö½ð±Ò¡±\n");
                    Sleep(500);
                    printf("¡°5¸ö½ð±Ò£¿¡±\n");
                    Sleep(500);
                    printf("ÄãÔ­±¾Ã»ÓÐÔÚÒâÕâ¸öСÄк¢.......\n");
                    Sleep(500);
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    printf("½ð±Ò+5\n");
                    qian+=5;
                    Sleep(500);
                }
                if(b==2){
                    printf("¹ýÁËÒ»»á.......\n");
                    Sleep(500);
                    printf("Ò»¸öС¹ÖÓ­Ãæ×ßÀ´\n");
                    Sleep(500);
                    printf("Ô­À´ÕâÌõ·ÉÏÕæµÄÓйÖÎï\n");
                    Sleep(500);
                    printf("µØÃæÉϺÃÏñ»¹ÓÐСÄк¢µôϵĶ«Î÷\n");
                    Sleep(500);
                    printf("ËûÓ¦¸ÃÊÇ˳ÀûÌÓÅÜÁË°É£¿\n");
                    Sleep(500);
                    system("CLS");
                    guaigs=5;
                    gongj=gong;
                    fangj=fang;
                    guais=sui(25+m*10,10);
                    c=5;
                    fangfan=10;
                    gongjh();
                    if(sheng>0){
                        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                        qian01=qian;
                        qian=qian+sui(1,2);
                        printf("½ð±Ò+%d\n",qian-qian01);
                    }       
                    gong=gongj;
                    fang=fangj;
                    cout<<endl; 
                    b=0;
                }   
            }
            if(o>=29&&o<=36){
                printf("ÄãÓöµ½ÁËÒ»¸öÄêÇáÈË£¬\n");
                Sleep(500);
                printf("ËûµÄÁ³ÉÏÒ»Ö±´ø×Å΢Ц£¬¿´ÆðÀ´Ê®·ÖºÍÉÆ¡£\n");
                Sleep(500);
                printf("ËûÄóöÒ»¸ö²»¹æÔòÇò×´Î\n");
                Sleep(500);
                printf("˵Õâ½ÐÉÁÒ«µÄÆ«·½Èý°ËÃæÌ壬ÄÜÕÙ»½ÉñÃ÷£¬ÊµÏÖÄãÈý¸öÔ¸Íû¡£\n");
                Sleep(500);
                printf("ËûµÄÔ¸ÍûÒѾ­ÓÃÍêÁË£¬ÏÖÔÚÏëÓÃËü»»Ò»Ð©Ç®£¬ÒªÏàÐÅËûÂð£¿\n");
                Sleep(500);
                for(int i=1;i<=5;i++){
                    printf(".");
                    Sleep(200);
                }
                printf("ÇëÑ¡Ôñ\n");
                Sleep(500);
                if(qian>=50){ 
                    printf("1.¸øÓè     2.ËãÁË°É\n");
                    scanf("%d",&b);
                }
                else{ 
                    printf("1.½ð±Ò²»¹»ËãÁË°É\n");
                    b=2;
                }
                b=_getch()-'0';
                if(b==1){
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    printf("½ð±Ò-50=%d\n",qian);
                    qian-=50;
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
                    printf("Ëû¸æËßÄãÖ»Òª°ÑÕâ¸ö¶«Î÷·ÅÔÚºÚÒ¹Àï¾ÍÐÐÁË¡£\n");
                    Sleep(500);
                    printf("ÄãÏàÐÅÁËËû˵µÄ»°¡£\n");
                    Sleep(500);
                    printf("\n ÔÚÒ¹ÀÄã°ÑËü·ÅÔÚÁËÒ»¸öûÓйâÏߵĵط½\n");
                    Sleep(500);
                    printf("Ò»Ö»ÀàËÆòùòðµÄÖ×Õ͹ÖÎ»ðºìµÄ¶ÀÑÛÁѳÉÈý°êµÄÉúÎïͻȻ³öÏÖ¡£\n");
                    Sleep(500);
                    printf("Äã±»Ëû¿Ö²ÀµÄÐÎÏóÏŵ½¾«Éñ´íÂÒ£¬ÑÛÕöÕöµÄ¿´×ŵkÍ̵ôÁËÄã¡£\n");
                    Sleep(500);
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
                    cout<<"ÄãËÀÁË"<<endl;
                    Sleep(1000);
                    cout<<"ÇëÈ¥É̵겹ѪºóÔÙÕ½¶·"<<endl;
                    Sleep(1000);
                    cout<<"¸´»îÖÐ";
                    sheng=-1;
                    for(int i=1;i<=5;i++){
                        printf(".");
                        Sleep(500);
                    }
                }
                if(b==2){
                    printf("ËûËÊÁËËʼ磬\n");
                    Sleep(500);
                    printf("ʲôҲû˵£¬\n");
                    Sleep(500);
                    printf("Âõ×ųÁÖصIJ½·¥×ßÁË¡£\n");
                    Sleep(500);
                }
            }
            if(o>=20&&o<=28){
                system("CLS");
                printf("Ò»¸öСľÎÝ£¿£¿£¿\n");
                for(int i=1;i<=5;i++){
                    printf(".");
                    Sleep(200);
                }
                printf("\n½øÈ¥¿´¿´\n");
                Sleep(1000);
                muwu=sui(5,2);
                if(muwu==5){
                    system("CLS");
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
                    printf("ÄãµôÈëÁË´óħÍõµÄÏÝÚå\n");
                    Sleep(1000);
                    sheng=-1;
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
                    cout<<"ÄãËÀÁË"<<endl;
                    Sleep(1000);
                    cout<<"ÇëÈ¥É̵겹ѪºóÔÙÕ½¶·"<<endl;
                    Sleep(1000);
                    cout<<"¸´»îÖÐ";
                    for(int i=1;i<=5;i++){
                        printf(".");
                        Sleep(500);
                    }
                }
                if(muwu==6){
                    system("CLS");
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    qian01=qian; 
                    printf("С¹ÖµÄ²Ø±¦µã£¡£¿\n");
                    Sleep(1000);
                    qian=qian+sui(8,7);
                    printf("½ð±Ò+%d\n",qian-qian01);
                    Sleep(500);
                }
                if(muwu==7){
                    system("CLS");
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY);
                    printf("·¢ÏÖÁ˲»¿ÉÃû×´µÄµñÏñ\n");
                    Sleep(1000);
                    printf("ÄãÒòΪ¾«Éñ±ÀÀ£¶øÊÜÉËÁË\n");
                    cout<<"×ÔÉíÉúÃü"<<"-"<<5<<"="<<sheng<<endl;
                    if(sheng>=0){
                        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
                        cout<<"ÄãËÀÁË"<<endl;
                        Sleep(1000);
                        cout<<"ÇëÈ¥É̵겹ѪºóÔÙÕ½¶·"<<endl;
                        Sleep(1000);
                        cout<<"¸´»îÖÐ";
                        for(int i=1;i<=5;i++){
                            printf(".");
                            Sleep(500); 
                        }
                    }
                }
            }
            if(o>=70&&o<=75){
                system("CLS");
                cout<<"ÄãÓöµ½ÁËÇÔ±ÒÕߣ¡"<<endl;
                printf("ÇëÉÔºó");
                for(int i=1;i<=5;i++){
                    printf(".");
                    Sleep(200);
                }
                qie=1;
                cout<<endl;
                guaigs=5;
                gongj=gong;
                fangj=fang;
                if(m==1){
                    guais=sui(105,10);
                }
                else
                    guais=sui(65,10);
                c=0;
                fangfan=10;
                gongjh();
                if(sheng>0){
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    qian01=qian;
                    qian=qian+0;
                    printf("½ð±Ò+%d\n",qian-qian01);
                    Sleep(2000);
                }
                else{
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    qian01=qian;
                    qian=qian/2;
                    printf("½ð±Ò-%d\n",qian01-qian);
                    Sleep(2000);
                }
                gong=gongj;
                fang=fangj;
                qie=0;
                cout<<endl;
            }
            if(o>=80&&o<=84){
                system("CLS");
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                cout<<"------ÄãÕÒµ½Á˱¦Ï䣡------"<<endl;
                printf("ÇëÉÔºó");
                for(int i=1;i<=5;i++){
                    printf(".");
                    Sleep(200);
                }
                qian01=qian;
                qian=qian+sui(8,12);
                printf("½ð±Ò+%d\n",qian-qian01);
                Sleep(2000);
            }
            printf("\n");
            system("CLS");
            SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY);
            cout<<"1.С¹Ö"<<endl;
            if(gong>=15){
                cout<<"2.ħͷ"<<endl;
                cout<<"3.»ÃÓ°"<<endl;
                if(gong>=25){
                    cout<<"4.´óħÍõ"<<endl;
                    cout<<"ÊäÈë0Í˳ö"<<endl;
                    cout<<endl;
                    b=_getch()-'0'; 
                }
                else{
                    cout<<"ÊäÈë0Í˳ö"<<endl;
                    cout<<endl;
                    b=_getch()-'0'; 
                } 
            }
            else{
                cout<<"ÊäÈë0Í˳ö"<<endl;
                cout<<endl;
                b=_getch()-'0'; 
            } 
            if(b==1){
                system("CLS");
                guaigs=5;
                gongj=gong;
                fangj=fang;
                guais=sui(25+m*10,10);
                c=5;
                fangfan=10;
                gongjh();
                if(sheng>0){
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    qian01=qian;
                    qian=qian+sui(1,2);
                    printf("½ð±Ò+%d\n",qian-qian01);
                }
                gong=gongj;
                fang=fangj;
                cout<<endl; 
                b=0;
            }
            if(b==2){
                system("CLS");
                guaigs=10;
                gongj=gong;
                fangj=fang;
                guais=sui(45+10*m,10);
                fangfan=6;
                c=7;
                gongjh();
    //              (int guais,int guaig,int sheng,int gong,int fang,int yao,int jg,int jf,int shengm,int fangfan)
                if(sheng>0){
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    qian01=qian;
                    qian=qian+sui(8,4);
                    printf("½ð±Ò+%d\n",qian-qian01);
                }
                gong=gongj;
                fang=fangj;
                cout<<endl;
                b=0;
            }
            if(b==3){
                system("CLS");
                guaigs=15;
                gongj=gong;
                fangj=fang;
                guais=sui(30+10*m,70+5*m);
                fangfan=8;
                c=7;
                gongjh();
    //              (int guais,int guaig,int sheng,int gong,int fang,int yao,int jg,int jf,int shengm,int fangfan)
                if(sheng>0){
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    qian01=qian;
                    qian=qian+sui(2,28);
                    printf("½ð±Ò+%d\n",qian-qian01);
                }
                gong=gongj;
                fang=fangj;
                cout<<endl;
                b=0;
            }
            if(b==4){
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
                gongj=gong;
                fangj=fang;
                guais=sui(95+200*m,10);
                c=10;
                fangzhi=c;
                hlf=hl;
                skf=sk;
                tlf=tl;
                while(guais>0&&sheng>0){
                    gongs=sui(gong-2,4);
                    if(renbao==1){
                        gongs*=3;
                        renbao=0;
                    }
                    guaig=sui(18+15*m,4);
                    if(bao==3){
                        guaig=guaig*3;
                        bao=0;
                    }
                    printf("\n");
                    printf("------------------------------\n");
                    printf("ħÍõÉúÃü: %d\n",guais);
                    printf("ħÍõ¹¥»÷: %d--%d\n",18+15*m,18+15*m+4);
                    printf("×¢£ºÄ§Íõ±©»÷¹æÂɲ»±ä£¡\n");
                    printf("\n------------------------------\n");
                    cout<<"1.¹¥»÷"<<endl; 
                    if(fangzhi==0) cout<<"2.·ÀÓù£¨´ÎÊý"<<fangzhi<<"£©"<<endl;
                    cout<<"3.à¾Ò©£¨ÉÁ±Ü£©"<<endl;
                    if(hlf>0||tlf>0||skf>0)cout<<"4.·¨ÕÈ"<<endl;
                    cout<<endl;
                    b=_getch()-'0'; 
                    if(b==1){
                        guais=guais-gongs;
                        sheng=sheng-guaig;
                        cout<<"¹ÖÎïÉúÃü"<<"-"<<gongs<<"="<<guais<<endl;
                        cout<<"×ÔÉíÉúÃü"<<"-"<<guaig<<"="<<sheng<<endl;
                        bao++;
                    }
                    if(b==2&&fangzhi!=0){
                        if(fang>guaig){
                            if(fang-guaig>10){
                                guais=guais-10;
                                cout<<"¹ÖÎïÉúÃü"<<"-"<<10<<"="<<guais<<endl;
                                bao++;
                            }
                            else{
                                guais=guais-fang+guaig;
                                cout<<"¹ÖÎïÉúÃü"<<"-"<<fang-guaig<<"="<<guais<<endl;
                                bao++;
                            }
                        }
                        else{
                            sheng=sheng-(guaig-fang);
                            cout<<"×ÔÉíÉúÃü"<<"-"<<guaig-fang<<"="<<sheng<<endl;
                            bao++;
                        }
                        fangzhi--;
                    }
                    if(b==3){
                        cout<<"1.»Ö¸´ÁéÒ©"<<endl; 
                        cout<<"2.ÊÈѪҩ¼Á"<<endl;
                        cout<<"3.¸ÖÌúºÏ¼Á"<<endl;
                        cin>>b;
                        if(b==1&&yao>=1){
                            yao--;
                            sheng=sheng+20;
                            if(sheng>shengm)sheng=shengm;
                            cout<<"ÁéÒ©ÊýÁ¿"<<yao<<endl;
                            cout<<"×ÔÉíÉúÃü+20£¨"<<sheng<<"£©"<<endl;
                            bao++;
                        }
                        if(b==1&&yao==0) printf("ÎÞ¿ÉÓÃÒ©¼Á£¡\n"); 
                        if(b==2&&jg>=1){
                            jg--;
                            gong++;
                            sheng-=guaig/10;
                            cout<<"×ÔÉíÉúÃü"<<"-"<<guaig/10<<"="<<sheng<<endl;
                            cout<<"Ò©¼ÁÊýÁ¿"<<jg<<endl;
                            cout<<"×ÔÉí¹¥»÷+1£¨"<<gong<<"£©"<<endl;
                            bao++;
                        }
                        if(b==2&&jg==0) printf("ÎÞ¿ÉÓÃÒ©¼Á£¡\n"); 
                        if(b==3&&jf>=1){
                            jf--;
                            fang++;
                            sheng-=guaig/10;
                            cout<<"×ÔÉíÉúÃü"<<"-"<<guaig/10<<"="<<sheng<<endl;
                            cout<<"ºÏ¼ÁÊýÁ¿"<<jf<<endl;
                            cout<<"×ÔÉí·ÀÓù+1£¨"<<fang<<"£©"<<endl;
                            bao++;
                        }
                        if(b==3&&jf==0) printf("ÎÞ¿ÉÓÃÒ©¼Á£¡\n"); 
                    }
                    if(b==4){
                        if(hlf>0)cout<<"1.»ØÂÖ5000£¨·´ÉË£© ¼ÛÖµ£º100"<<endl;
                        if(skf>0)cout<<"2.ʱ¿ÕÕÛµþÆ÷£¨·ÀÓùÖµ»ØÂú£© ¼ÛÖµ100"<<endl;
                        if(tlf>0)cout<<"3.ħÍõµÄͷ­£¨Ï´ÎÉ˺¦ÓµÓб©»÷£© ¼ÛÖµ200"<<endl;
                        cin>>b;
                        if(b==1&&hlf>=1){
                            hlf--;
                            printf("·´µ¯É˺¦£¡");
                            cout<<"×ÔÉíÉúÃü"<<"-"<<guaig/10<<"="<<sheng<<endl;
                            cout<<"»ØÂÖ´ÎÊý"<<hlf<<endl;
                            guais=guais-guaig;
                            cout<<"¹ÖÎïÉúÃü-"<<guaig<<"="<<guais<<endl;
                        }
                        if(b==1&&hlf==0) printf("ÎÞ¿ÉÓ÷¨ÕÈ£¡\n"); 
                        if(b==2&&skf>=1){
                            skf--;
                            printf("ʱ¿Õµ¹Á÷£¡");
                            fangzhi=c;
                            cout<<"×ÔÉí·ÀÓù´ÎÊý»Ö¸´"<<"="<<fangzhi<<endl;
                            cout<<"ʱ¿ÕÊýÁ¿"<<"="<<skf<<endl;
                        }
                        if(b==2&&skf==0) printf("ÎÞ¿ÉÓ÷¨ÕÈ£¡\n"); 
                        if(b==3&&tlf>=1){
                            tlf--;
                            renbao=1;
                            cout<<"Ï´ι¥»÷½«»á±©»÷"<<endl;
                            cout<<"ͷ­ʹÓÃÊýÁ¿"<<tlf<<endl;
                        }
                        if(b==3&&jf==0) printf("ÎÞ¿ÉÓ÷¨ÕÈ£¡\n"); 
                    }
                    if(sheng<=0){
                        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
                        cout<<"ÄãËÀÁË"<<endl;
                        Sleep(1000);
                        cout<<"ÇëÈ¥É̵겹ѪºóÔÙÕ½¶·"<<endl;
                        Sleep(1000);
                        cout<<"¸´»îÖÐ";
                        for(int i=1;i<=5;i++){
                            printf(".");
                            Sleep(500);
                        }
                        printf("\n");
                        break;
                    }
                    if(fangzhi==0){
                        printf("·ÀÓù´ÎÊýÒÑÓþ¡\n"); 
                    }
                }
                if(sheng>0){
                    printf("Ä㾹Ȼ»÷°ÜÁËħÍõ£¡£¡£¡\n"); 
                    printf("¿ÉÊÇ£¬ÄãÕæµÄÓ®ÁËÂð£¿");
                    for(int i=1;i<=5;i++){
                        printf(".");
                        Sleep(800);
                    }
                    printf("\nħʯµÄÁ¦Á¿½«´ÍÓèËüÃÇÐÂÉú£¡");
                    printf("\n"); 
                    Sleep(1000);
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                    qian=qian+100;
                    m++; 
                    cout<<"½ð±Ò"<<"+100"<<endl;
                    cout<<"------Äã»ñµÃÁËħʯ------"<<endl<<endl;
                }
                bao=0;
                gong=gongj;
                fang=fangj;
                cout<<endl; 
            }
        }
        else if(b==2&&sheng<=0){
            SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
            cout<<"ÄãËÀÁË"<<endl;
            cout<<"ÇëÈ¥É̵겹ѪºóÔÙÕ½¶·"<<endl<<endl;
        }
        else if(b==3){
            system("CLS");
            SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN |FOREGROUND_BLUE);
            printf("ÇëÉÔºó");
            for(int i=1;i<=5;i++){
                printf(".");
                Sleep(500);
            }
            printf("\n");
            printf("\n×ÔÉí×ÊÁÏ\n");
            printf("----------------------------------------------\n");
            printf("ÉúÃü: %d                   ",sheng);
            printf("¹¥»÷: %d\n\n",gong);
            printf("·ÀÓù: %d                   ",fang);
            printf("ÉúÃüÉÏÏÞ: %d\n\n",shengm);
            printf("½ð±Ò: %d                   ",qian);
            printf("»Ö¸´ÁéÒ©: %d\n\n",yao);
            printf("ÊÈѪҩ¼Á: %d                   ",jg);
            printf("¸ÖÌúºÏ¼Á: %d\n\n",jf);
            if(m>0) printf("ħʯ: %d                   ",m);
            printf("\n----------------------------------------------\n");
            cout<<endl<<endl;
        }
        if(m==5){
            if(mo==1){
                system("CLS");
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
                Sleep(2000);
                cout<<"ÄãµÚÎå´Î»÷°ÜÁËħÍõ£¬"<<endl;
                Sleep(2000);
                cout<<"¿´×ÅÑÛǰûÔÙ¸´»îµÄħÍõµÄʬÌ壬"<<endl;
                Sleep(2000);
                cout<<"¡°½áÊøÁË£¿¡±"<<endl;
                Sleep(2000);
                cout<<"Äã¿´×ÅÈÔÔÚÉ¢·¢×Å×ÏÉ«¹ââµÄħʯ£¬"<<endl;
                Sleep(2000);
                cout<<"°µ×Ô·ñ¶¨ÁËÕâ¸öÎÊÌâ¡£"<<endl;
                Sleep(2000);
                cout<<"ÄãµÄÊÓÏß²»¾­Òâ¼äɨ¹ýÄã´ÓħÍõÉíÉÏ»ñµÃµÄÕ½ÀûÆ·£¬"<<endl;
                Sleep(2000);
                cout<<"È´·¢ÏÖËüÃÇËƺõºÍÄãµÄÉíÌåÈÚºÏÔÚÁËÒ»Æð¡£"<<endl;
                Sleep(2000);
                cout<<"¡°Ôõô»ØÊ£¿£¡¡±"<<endl;
                Sleep(2000);
                cout<<"ÄãÑÛÇ°µÄ¾°ÎïÖð½¥±äµÃÄ£ºý."<<endl;
                Sleep(2000);
                cout<<"ÄãµÄÑÛ¾¦É¢·¢×Å×ÏÉ«µÄ¹îÒìµÄ¹ââ¡£"<<endl;
                Sleep(2000);
                cout<<"Òâʶģºý¼ä£¬Äã¿´µ½Ò»¸ö»ÃÓ°³öÏÖÔÚÄãÃæÇ°¡£"<<endl;
                Sleep(2000);
                cout<<"ËüÊÕ×ßÁËËÄ¿éħʯ£¬°Ñ×îºóÒ»¿é·ÅÔÚÁËÄãµÄÐØÇ°¡£"<<endl;
                Sleep(2000);
                cout<<"¡°Ô­À´...Èç´Ë...¡±"<<endl;
                Sleep(2000);
                cout<<"Ò»ÉùÅ­ºð»Øµ´ÔÚɽ¹ÈÖ®¼ä¡£"<<endl;
                Sleep(2000);
                cout<<"......"<<endl;
                Sleep(2000);
                cout<<"Ò»¸öеÄÉíÓ°³öÏÖ£¬"<<endl;
                Sleep(2000);
                cout<<"¡°Ä§Íõ£¬ÎÒÀ´ÌÖ·¥ÄãÁË£¡¡±"<<endl;
                Sleep(2000);
                break; 
            }
            else{
                system("CLS");
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN); 
                cout<<"²Êµ°½á¾Ö£¡£¡£¡£¡£¡"<<endl;
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
                Sleep(2000);
                cout<<"ÄãµÚÎå´Î»÷°ÜÁËħÍõ£¬"<<endl;
                Sleep(2000);
                cout<<"¿´×ÅÑÛǰûÔÙ¸´»îµÄħÍõµÄʬÌ壬"<<endl;
                Sleep(2000);
                cout<<"¡°½áÊøÁË£¿¡±"<<endl;
                Sleep(2000);
                cout<<"Äã¿´×ÅÈÔÔÚÉ¢·¢×Å×ÏÉ«¹ââµÄħʯ£¬"<<endl;
                Sleep(2000);
                cout<<"°µ×Ô·ñ¶¨ÁËÕâ¸öÎÊÌâ¡£"<<endl;
                Sleep(2000);
                cout<<"ÄãµÄÊÓÏß²»¾­Òâ¼äɨ¹ýÄãÄãµÄÉíÌ壬"<<endl;
                Sleep(2000);
                cout<<"È´·¢ÏÖÄãµÄÉíÌåÔÚÖð½¥±äµÃ͸Ã÷¡£"<<endl;
                Sleep(2000);
                cout<<"¡°Ôõô»ØÊ£¿£¡¡±"<<endl;
                Sleep(2000);
                cout<<"ÄãµÄ¶ú±ß»Øµ´Æ𲻿ÉÃû×´µÄÊÂÎïµÄµÍÓï¡£"<<endl;
                Sleep(2000);
                cout<<"ÄãµÄ´óÄÔÏÝÈëÁË·è¿ñ¡£"<<endl;
                Sleep(2000);
                cout<<"Äã¿´µ½Ò»¸ö»ÃÓ°³öÏÖÔÚÌì±ß£¬²¢ÇÒÔÚÂýÂýµØÏûʧ¡£"<<endl;
                Sleep(2000);
                cout<<"ÄãµÄÉñÇéͻȻ±äµÃ¼á¶¨¶øÓÖ·è¿ñ¡£"<<endl;
                Sleep(2000);
                cout<<"¡°×ñÃü...ÎÒµÄÖ÷ÈË...¡±"<<endl;
                Sleep(2000);
                cout<<"......"<<endl;
                Sleep(2000);
                cout<<"Ò»¸öеÄÉíÓ°³öÏÖ£¬"<<endl;
                Sleep(2000);
                cout<<"¡°Ä§Íõ£¬ÎÒÀ´ÌÖ·¥ÄãÁË£¡¡±"<<endl;
                Sleep(2000);
                break;
            }
        }
    }
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
    cout<<endl; 
    cout<<"---------------------------------------------------------";
    cout<<"Íê½á";
    cout<<"---------------------------------------------------------"<<endl;
    Sleep(2000);
    cout<<"¸ÐлÓÎÍæ";*/
        int a,b;
        cin>>a>>b;
        cout<<a+b;
        return 0;
    }
    
  • 1
    @ 2023-06-15 22:11:05

    超级大模拟:
    #include <iostream>
    #include <cmath>
    using namespace std;
    int fu=1,f=1,a,b,c=0;
    int main()
    {
    cin>>a>>b;
    if(a<0&&b>0)fu=2;
    if(a>0&&b<0)fu=3;
    if(a<0&&b<0)f=-1;
    if(a==0){cout<<b;return 0;}
    if(b==0){cout<<a;return 0;}
    a=abs(a);
    b=abs(b);
    if(a>b&&fu==3)f=1;
    if(b>a&&fu==3)f=-1;
    if(b>a&&fu==2)f=1;
    if(b<a&&fu==2)f=-1;
    if(fu==1)c=a+b;
    if(fu>1)c=max(a,b)-min(a,b);
    c*=f;
    cout<<c;
    return 0;
    }

  • 1
    @ 2023-05-26 16:53:32

    居然没看到2行代码,那我就来写一个

    #include<bits/stdc++.h>
    using namespace std;int main(){int a,b;cin>>a>>b;a += b;cout<<a<<endl;return 0;}
    

    原代码

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
          int a,b;
          cin>>a>>b;
          a += b;
          cout<<a<<endl;
          return 0;
    }
    
    
    
  • 1
    @ 2023-05-26 16:50:15

    大水题,废话不多说,上代码

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        int a,b;
        cin>>a>>b;
          a += b;
        cout<<a<<endl;
        return 0;
    }
    
  • 1
    @ 2022-10-06 23:31:29

    这道题就是逊啦!!!

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        int a,b;
        cin>>a>>b;
        cout<<a+b<<endl;
    }
    
    
  • 1
    @ 2022-05-08 18:14:23

    基础语法

    //头文件
    #include <iostream>
    #include <cstring>
    #include <algorithm>
    #include <cstdio>
    #include <cmath>
    //命名空间
    using namespace std;
    
    //主函数
    int main()
    {
        int x, y; //定义x,y
        //int类型,用"%d"输出
        scanf("%d%d", &x, &y); //输入x,y
        printf("%d", x + y); //输出x + y
        return 0;
    }
    
  • 0
    @ 2024-12-10 22:28:18

    一道很好的 树状数组 题。

    #include <iostream>
    #include <string>
    #include <cstdio>
    using namespace std;
    
    struct Array {
        int *arr;
        int lowbit(int x) {
            return x & -x;
        }
        int getsum(int x) { //计算[1,x]区间中数列和
            int ret=0;
            while(x>0) {
                ret+=arr[x];
                x=x-lowbit(x);
            }
            return ret;
        }
        
        void plus(int x, int v) { //把第x个元素增加v
            while(x <= (int)sizeof(arr)) {
                arr[x]=arr[x]+v;
                x=x+lowbit(x);
            }
        }
        
        Array() {}
        Array(int length, int arr[]) {
            this->arr=new int[length+1];
            for(int i=1; i<=length; i++) this->arr[i]=0;
            for(int i=1; i<=length; i++) plus(i, arr[i-1]);
        }
        ~Array()=default;
    };
    
    int main() {
        Array a;
        int arr[2];
        scanf("%d%d", &arr[0], &arr[1]);
        a=Array(2, arr);
        printf("%d\n", a.getsum(2));
        return 0;
    }
    
  • 0
    @ 2024-12-09 16:51:14

    我有两篇题解:
    给新手小白的:

    #include<iostream>
    int main(){
        int a,b;
        scanf("%d %d",&a,&b);
        printf("%d",a+b);
        return 0;
    }
    

    这是给大佬的:

    #include<iostream>
    #include<string>
    #include<cstring>
    #include<cstdio>
    using namespace std;
    const int N = 1005;
    struct bign
    {
        int len,s[N];
        bign()  {  memset(s,0,sizeof(s));  len=1;  }
        bign(int num)  {  *this=num; }
        bign(char *num) { *this=num; }
        bign operator =(int num)
        {
            char c[N];
            sprintf(c,"%d",num);
            *this=c;
            return *this;
        }
        bign operator =(const char *num)
        {
            len=strlen(num);
            for (int i=0;i<len;i++) s[i]=num[len-1-i]-'0';
            return *this;
        }
        string str()
        {
            string res="";
            for (int i=0;i<len;i++) res=(char)(s[i]+'0')+res;
            return res;
        }
        void clean()
        {
            while (len>1&&!s[len-1]) len--;
        }
        bign operator +(const bign &b)
        {
            bign c;    
            c.len=0;
            for (int i=0,g=0;g||i<len||i<b.len;i++)
            {
                int x=g;
                if (i<len) x+=s[i];
                if (i<b.len) x+=b.s[i];
                c.s[c.len++]=x%10;
                g=x/10;
            }
            return c;
        }
        bign operator -(const bign &b)
        {
            bign c;
            c.len=0;
            int x;     
            for (int i=0,g=0;i<len;i++)
            {
                x=s[i]-g;
                if (i<b.len) x-=b.s[i];
                if (x>=0) g=0;
                else{          
                    x+=10;
                    g=1;
                };
                c.s[c.len++]=x;
            }
            c.clean();
            return c;
        }
        bign operator *(const bign &b)
        {
            bign c;
            c.len=len+b.len;
            for (int i=0;i<len;i++) for (int j=0;j<b.len;j++) c.s[i+j]+=s[i]*b.s[j];
            for (int i=0;i<c.len-1;i++) { c.s[i+1]+=c.s[i]/10; c.s[i]%=10; }
            c.clean();
            return c;  
        }
        bool operator <(const bign &b)
        {
            if (len!=b.len) return len<b.len;
            for (int i=len-1;i>=0;i--)
                 if (s[i]!=b.s[i]) return s[i]<b.s[i];
            return false;
        }
        bign operator +=(const bign &b)
        {
            *this=*this+b;
            return *this;
        }
        bign operator -=(const bign &b)
        {
            *this=*this-b;
            return *this;
        }  
    };
    istream& operator >>(istream &in,bign &x)
    {
      string s;
      in>>s;
      x=s.c_str();
      return in;
    }
    ostream& operator <<(ostream &out,bign &x)
    {
        out<<x.str();
        return out;
    }
    int main(){
        bign a,b,c;
        ios::sync_with_stdio(false);
        cin>>a>>b;
        c=a+b;
        cout<<c<<endl;
        return 0;
    }
    

    希望这篇题解有助于大家!

  • 0
    @ 2024-11-09 16:36:24

    水题中的水题中的水题

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        long long a,b;
        cin>>a>>b;
        cout<<a+b;
    
        return 0;
    }
    
  • 0
    @ 2024-08-30 19:03:01

    #include<bits/stdc++.h>
    using namespace std;
    long long a[1000],b[1000],c[1000];
    int main(){
    string s,s1;
    cin>>s>>s1;
    for(int i=0;i<s.size();i++){
    a[i]=s[s.size()-1-i]-'0';
    }
    for(int j=0;j<s1.size();j++){
    b[j]=s1[s1.size()-1-j]-'0';
    }
    int l;
    if(s.size()>s1.size()){
    l=s.size();
    }else{
    l=s1.size();
    }
    for(int i=0;i<l;i++){
    c[i]=a[i]+b[i];
    }
    for(int i=0;i<l;i++){
    if(c[i]>=10){
    c[i]=c[i]-10;
    c[i+1]++;
    }
    }
    if(c[l]!=0){
    l++;
    }
    for(int i=l-1;i>=0;i--){
    cout<<c[i];
    }
    return 0;
    }

  • 0
    @ 2024-08-24 10:07:41

    非常简单的新手入门题
    ```cpp
    #include <iostream>
    //头文件
    using namespace std;
    //命名空间
    int main()
    {
    int a,b;//定义
    cin>>a>>b;//输入
    cout<<a+b<<endl;//输出
    }

信息

ID
1000
难度
9
分类
(无)
标签
(无)
递交数
74446
已通过
28492
通过率
38%
被复制
223