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;}
^
|