4 条题解

  • 1
    @ 2023-8-6 12:18:21
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n,a,b,c,sum;
        cin>>n>>a>>b>>c;
        sum = a+b+c;
        if(n>=sum){
            cout<<n-sum<<" "<<"YES"<<endl;
        }else{
            cout<<sum-n<<" "<<"NO"<<endl;
        }
        return 0;
    }
    
    • -1
      @ 2023-7-6 11:11:14
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	int n,a,b,c,d;
      	cin>>n>>a>>b>>c;
      	if(n>=(a+b+c))
      	{
      		cout<<n-(a+b+c)<<" "<<"YES";
      	}
      	if(n<(a+b+c))
      	{
      		cout<<(a+b+c)-n<<" "<<"NO";
      	}
      	return 0;`
      
      • -2
        @ 2023-7-6 11:10:52

        ······ #include<bits/stdc++.h> using namespace std; int main() { int n,a,b,c,d; cin>>n>>a>>b>>c; if(n>=(a+b+c)) { cout<<n-(a+b+c)<<" "<<"YES"; } if(n<(a+b+c)) { cout<<(a+b+c)-n<<" "<<"NO"; } return 0;· ······

        • -2
          @ 2023-7-6 11:10:18

          #include<bits/stdc++.h> using namespace std; int main() { int n,a,b,c,d; cin>>n>>a>>b>>c; if(n>=(a+b+c)) { cout<<n-(a+b+c)<<" "<<"YES"; } if(n<(a+b+c)) { cout<<(a+b+c)-n<<" "<<"NO"; } return 0;

          • 1

          信息

          ID
          632
          时间
          1000ms
          内存
          16MiB
          难度
          7
          标签
          递交数
          16
          已通过
          9
          上传者