2 solutions

  • 2
    @ 2025-5-23 21:30:29

    2025mzwc中庸之道

    废话不多说直接上代码

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    long long a,s,d;cin>>a>>s>>d;
    long long max1=a,min1=a;
    max1=max(max1,s);min1=min(min1,s);
    max1=max(max1,d);min1=min(min1,d);
    cout<<a+s+d-max1-min1;
    return 0;
    }
    
    

    题目传送门 ☜戳亿下

    不喜勿喷小雪参

  • 0
    @ 2025-8-16 19:23:09
    by - wsy 2025 8 16
    #include<bits/stdc++.h>
    using namespace std;
    
    int main(){
    	long long a,b,c;
    	cin >>a >>b >>c;
    	long long  maxx = 0;
    	long long minn = 0;
    	maxx = max(max(a,b),c);
    	minn = min(min(a,b),c);
    	long long  sum =maxx+minn;
    	cout << a+b+c-sum; 
    	return 0;
    }
    
    
    • 1

    Information

    ID
    4908
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    9
    Tags
    (None)
    # Submissions
    204
    Accepted
    20
    Uploaded By