#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,maxn=0; cin >> a >> b >> c; for(int i=1;i<=min(a,min(b,c)); i++){ if(a%i0 and b%i0 and c%i==0){ if(maxn<i){ maxn=i; } } } cout << maxn; return 0;}
By signing up a HFOJ universal account, you can submit code and join discussions in all online judging services provided by us.
Using your HFOJ universal account