0_0_20612897_28086.cpp:4:5: error: expected unqualified-id before '>=' token
>=1; } return r;}ll sol(int k){ ll x,y,t=B[0][k],m=A[0]; for(int i=1;i<n;i++) { ll d=egcd(m,A[i],x,y),tp=B[i][k]-t; if(tp%d!=0)return -1; x=tp/d*x%A[i]; if(x<0)x+=A[i]; t=x*m+t; m=m/gcd(m,A[i])*A[i]; } return t%m;}int main(){ while(~scanf("%d",&n)) { memset(v,0,sizeof(v)); memset(B,0,sizeof(B)); for(int i=0;i<n;i++) { scanf("%I64d",A+i); ll tp=A[i]; for(ll k=2;k*k<=tp;++k) if(tp%k==0) { v[k]=1; while(tp%k==0) { ++B[i][k]; tp/=k; } } if(tp>1){v[tp]=1;B[i][tp]=1;} } ll res=1; for(int i=2;i<9998;i++) if(v[i]) { ll t=sol(i); if(!~t){res=-1;break;} res=res*Pow((ll)i,t)%M; } printf("%I64d\n",res); }}
^
0_0_20612897_28086.cpp:4:10: error: expected declaration before '}' token
>=1; } return r;}ll sol(int k){ ll x,y,t=B[0][k],m=A[0]; for(int i=1;i<n;i++) { ll d=egcd(m,A[i],x,y),tp=B[i][k]-t; if(tp%d!=0)return -1; x=tp/d*x%A[i]; if(x<0)x+=A[i]; t=x*m+t; m=m/gcd(m,A[i])*A[i]; } return t%m;}int main(){ while(~scanf("%d",&n)) { memset(v,0,sizeof(v)); memset(B,0,sizeof(B)); for(int i=0;i<n;i++) { scanf("%I64d",A+i); ll tp=A[i]; for(ll k=2;k*k<=tp;++k) if(tp%k==0) { v[k]=1; while(tp%k==0) { ++B[i][k]; tp/=k; } } if(tp>1){v[tp]=1;B[i][tp]=1;} } ll res=1; for(int i=2;i<9998;i++) if(v[i]) { ll t=sol(i); if(!~t){res=-1;break;} res=res*Pow((ll)i,t)%M; } printf("%I64d\n",res); }}
^
|