fork download
  1. // بسم الله الرحمن الرحيم
  2.  
  3. #include <bits/stdc++.h>
  4. using namespace std;
  5.  
  6. template<typename T> ostream& operator<<(ostream& os, vector<T>& v) { for (auto& i : v) os << i << ' '; return os; }
  7. template<typename T> istream& operator>>(istream& is, vector<T>& v) { for (auto& i : v) is >> i; return is; }
  8.  
  9. #define FreePalestine ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
  10.  
  11. #define endl '\n'
  12. #define int long long
  13. #define ull unsigned long long
  14. #define vi vector<int>
  15. #define vvi vector<vi>
  16. #define pi pair<int, int>
  17. #define all(a) a.begin(), a.end()
  18. #define all_r(a) a.rbegin(), a.rend()
  19.  
  20. const int N = 2e5, oo = 2e18, MOD = 1e9+7;
  21.  
  22. void solve() {
  23. int a, b, c; cin >> a >> b >> c;
  24. int mn = a;
  25. if (b < a && b < c) {
  26. mn = b;
  27. } else if (c < a && c < b) {
  28. mn = c;
  29. }
  30. int mx = a;
  31. if (b > a && b > c) {
  32. mx = b;
  33. } else if (c > a && c > b) {
  34. mx = c;
  35. }
  36. cout << mx-mn;
  37. }
  38.  
  39.  
  40. signed main() {
  41. FreePalestine;
  42. // #ifndef ONLINE_JUDGE
  43. // freopen("input.txt", "r", stdin);
  44. // freopen("output.txt", "w", stdout);
  45. // #endif
  46. int t; t = 1;
  47. // cin >> t;
  48. while (t--) solve();
  49. return 0;
  50. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
94609494188768