F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_20614699_32283.cpp:11:132: error: stray '#' in program
     using namespace std;const double eps = 1e-6;const double pi = acos(-1.0);const int INF = 0x3f3f3f3f;const int MOD = 1000000007;#define ll long long#define CL(a) memset(a,0,sizeof(a)) unsigned ll n,m; ll gcd(ll a, ll b){    if(a%b)        return gcd(b, a%b);    return b;} int main(){    int T;    cin>>T;    while(T--)    {        cin>>n>>m;        int ans=0;        while(n!=m)        {            if(m%n){cout<<"-1"<<endl; break;}            ll k=gcd(m/n, n);            if(k==1){cout<<"-1"<<endl; break;}            n*=k;            ans++;        }        if(n==m) cout<<ans<<endl;    }    return 0;}
                                                                                                                                    ^
0_0_20614699_32283.cpp:11:152: error: stray '#' in program
     using namespace std;const double eps = 1e-6;const double pi = acos(-1.0);const int INF = 0x3f3f3f3f;const int MOD = 1000000007;#define ll long long#define CL(a) memset(a,0,sizeof(a)) unsigned ll n,m; ll gcd(ll a, ll b){    if(a%b)        return gcd(b, a%b);    return b;} int main(){    int T;    cin>>T;    while(T--)    {        cin>>n>>m;        int ans=0;        while(n!=m)        {            if(m%n){cout<<"-1"<<endl; break;}            ll k=gcd(m/n, n);            if(k==1){cout<<"-1"<<endl; break;}            n*=k;            ans++;        }        if(n==m) cout<<ans<<endl;    }    return 0;}
                                                                                                                                                        ^
0_0_20614699_32283.cpp:11:133: error: 'define' does not name a type
     using namespace std;const double eps = 1e-6;const double pi = acos(-1.0);const int INF = 0x3f3f3f3f;const int MOD = 1000000007;#define ll long long#define CL(a) memset(a,0,sizeof(a)) unsigned ll n,m; ll gcd(ll a, ll b){    if(a%b)        return gcd(b, a%b);    return b;} int main(){    int T;    cin>>T;    while(T--)    {        cin>>n>>m;        int ans=0;        while(n!=m)        {            if(m%n){cout<<"-1"<<endl; break;}            ll k=gcd(m/n, n);            if(k==1){cout<<"-1"<<endl; break;}            n*=k;            ans++;        }        if(n==m) cout<<ans<<endl;    }    return 0;}
                                                                                                                                     ^
0_0_20614699_32283.cpp:11:205: error: 'll' does not name a type
     using namespace std;const double eps = 1e-6;const double pi = acos(-1.0);const int INF = 0x3f3f3f3f;const int MOD = 1000000007;#define ll long long#define CL(a) memset(a,0,sizeof(a)) unsigned ll n,m; ll gcd(ll a, ll b){    if(a%b)        return gcd(b, a%b);    return b;} int main(){    int T;    cin>>T;    while(T--)    {        cin>>n>>m;        int ans=0;        while(n!=m)        {            if(m%n){cout<<"-1"<<endl; break;}            ll k=gcd(m/n, n);            if(k==1){cout<<"-1"<<endl; break;}            n*=k;            ans++;        }        if(n==m) cout<<ans<<endl;    }    return 0;}
                                                                                                                                                                                                             ^
0_0_20614699_32283.cpp: In function 'int main()':
0_0_20614699_32283.cpp:11:341: error: 'n' was not declared in this scope
     using namespace std;const double eps = 1e-6;const double pi = acos(-1.0);const int INF = 0x3f3f3f3f;const int MOD = 1000000007;#define ll long long#define CL(a) memset(a,0,sizeof(a)) unsigned ll n,m; ll gcd(ll a, ll b){    if(a%b)        return gcd(b, a%b);    return b;} int main(){    int T;    cin>>T;    while(T--)    {        cin>>n>>m;        int ans=0;        while(n!=m)        {            if(m%n){cout<<"-1"<<endl; break;}            ll k=gcd(m/n, n);            if(k==1){cout<<"-1"<<endl; break;}            n*=k;            ans++;        }        if(n==m) cout<<ans<<endl;    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                     ^
0_0_20614699_32283.cpp:11:344: error: 'm' was not declared in this scope
     using namespace std;const double eps = 1e-6;const double pi = acos(-1.0);const int INF = 0x3f3f3f3f;const int MOD = 1000000007;#define ll long long#define CL(a) memset(a,0,sizeof(a)) unsigned ll n,m; ll gcd(ll a, ll b){    if(a%b)        return gcd(b, a%b);    return b;} int main(){    int T;    cin>>T;    while(T--)    {        cin>>n>>m;        int ans=0;        while(n!=m)        {            if(m%n){cout<<"-1"<<endl; break;}            ll k=gcd(m/n, n);            if(k==1){cout<<"-1"<<endl; break;}            n*=k;            ans++;        }        if(n==m) cout<<ans<<endl;    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                        ^
0_0_20614699_32283.cpp:11:449: error: 'll' was not declared in this scope
     using namespace std;const double eps = 1e-6;const double pi = acos(-1.0);const int INF = 0x3f3f3f3f;const int MOD = 1000000007;#define ll long long#define CL(a) memset(a,0,sizeof(a)) unsigned ll n,m; ll gcd(ll a, ll b){    if(a%b)        return gcd(b, a%b);    return b;} int main(){    int T;    cin>>T;    while(T--)    {        cin>>n>>m;        int ans=0;        while(n!=m)        {            if(m%n){cout<<"-1"<<endl; break;}            ll k=gcd(m/n, n);            if(k==1){cout<<"-1"<<endl; break;}            n*=k;            ans++;        }        if(n==m) cout<<ans<<endl;    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^
0_0_20614699_32283.cpp:11:481: error: 'k' was not declared in this scope
     using namespace std;const double eps = 1e-6;const double pi = acos(-1.0);const int INF = 0x3f3f3f3f;const int MOD = 1000000007;#define ll long long#define CL(a) memset(a,0,sizeof(a)) unsigned ll n,m; ll gcd(ll a, ll b){    if(a%b)        return gcd(b, a%b);    return b;} int main(){    int T;    cin>>T;    while(T--)    {        cin>>n>>m;        int ans=0;        while(n!=m)        {            if(m%n){cout<<"-1"<<endl; break;}            ll k=gcd(m/n, n);            if(k==1){cout<<"-1"<<endl; break;}            n*=k;            ans++;        }        if(n==m) cout<<ans<<endl;    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^
0_0_20614699_32283.cpp:11:527: error: 'k' was not declared in this scope
     using namespace std;const double eps = 1e-6;const double pi = acos(-1.0);const int INF = 0x3f3f3f3f;const int MOD = 1000000007;#define ll long long#define CL(a) memset(a,0,sizeof(a)) unsigned ll n,m; ll gcd(ll a, ll b){    if(a%b)        return gcd(b, a%b);    return b;} int main(){    int T;    cin>>T;    while(T--)    {        cin>>n>>m;        int ans=0;        while(n!=m)        {            if(m%n){cout<<"-1"<<endl; break;}            ll k=gcd(m/n, n);            if(k==1){cout<<"-1"<<endl; break;}            n*=k;            ans++;        }        if(n==m) cout<<ans<<endl;    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-24 07:44:42, Gzip enabled