分析:用循环求出数据,再break即可。
#include<iostream>
//#include<iomanip>
//#include<cmath>
//using std::fixed;
//using std::setprecision;
using std::cin;
using std::cout;
int main()
{
int a, b, c;
cin >> a >> b >> c;
for (int i = 2;; ++i)
{
if (a % i == b % i && b % i == c % i)
{
cout << i;
break;
}
}
}