Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main() {
- int a, b, c;
- cin >> a >> b >> c;
- int site_ednakvi_na_a = abs(a - b) * 10 + abs(a - c) * 10;
- int site_ednakvi_na_b = abs(b - a) * 10 + abs(b - c) * 10;
- int site_ednakvi_na_c = abs(c - a) * 10 + abs(c - b) * 10;
- int res = min(site_ednakvi_na_a, site_ednakvi_na_b);
- res = min(res, site_ednakvi_na_c);
- cout << res << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement