1 solutions

  • 2
    @ 2025-6-23 19:57:53

    函数版本

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

    基础版本

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

    Information

    ID
    839
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    # Submissions
    184
    Accepted
    97
    Uploaded By