4 solutions

  • 4
    @ 2021-10-12 0:30:12

    题目信息

    我们可以看到我们只需要输入两个值,然后输出他们的和即可,那么我们可以直接得到C++的代码:

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

    C语言的代码:

    main(){
    	int a,b;
    	scanf("%d %d",&a,&b);
        printf("%d\n",a+b);
    	return 0;
    }
    

    Information

    ID
    1
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    6
    Tags
    # Submissions
    1587
    Accepted
    484
    Uploaded By