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