Skocimis Author: Pakin Olanraktham View Problem Statement Source: PROGRAMMING.IN.TH Difficulty: ? Prerequisites: การเขียนโปรแกรมเบื้องต้น View External Solution เฉลย CC++ #include <stdio.h> #include <math.h> int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); printf("%d", int(fmax(b-a , c-b)) - 1); } #include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << max(b-a, c-b) - 1; }