#include #include #include #include using namespace std; long A,B; long gcd(long a,long b){ if(a<0)a=-a; if(b<0)b=-b; if(a>A>>B; long g=gcd(A,B); double ans=1./4; if(g) { for(int i=3;;i++) { long u=2+g*(i-2); if(u>20)break; double now=i-1; for(int j=0;j