fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. long long a,b,c;
  6. cin>>a>>b>>c;
  7.  
  8. if(a <= b && b <= c || c <= b && b <= a)
  9. cout<<b;
  10. else if(a <= c && c <= b || b <= c && c <= a)
  11. cout<<c;
  12. else
  13. cout<<a;
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5320KB
stdin
10000 9999 0
stdout
9999