criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <vector>

using namespace std;

int main()
{
    int64_t x, y;
    cin >> x >> y;

    if (x % y == 0)
    {
        cout << -1 << endl;
    }
    else
    {
        cout << (x * (y - 1)) << endl;
    }
}
#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <vector>

using namespace std;

int main()
{
    int64_t x, y;
    cin >> x >> y;

    if (x % y == 0)
    {
        cout << -1 << endl;
    }
    else
    {
        cout << (x * (y - 1)) << endl;
    }
}


Compiler output:
a.cc:39:5: error: redefinition of 'int main()'
   39 | int main()
      |     ^~~~
a.cc:13:5: note: 'int main()' previously defined here
   13 | int main()
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define INF 100000000
using namespace std;

int main() {
 
int64_t N,M;
cin >>N>>M;
// vector<int> A(N);
// for(int i=0; i<N; i++){cin>>A[i];}
// vector<vector<int>> A(N,vector<int>(M));
// for(int i=0; i<N; i++){for(int j=0; j<M; j++){cin>>A[i][j];}}
if(M%N==0)cout<<-1<<endl;
else cout<<N<<endl;
  }
}


Compiler output:
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define INF 100000000
using namespace std;

int main() {
 
int64_t N,M;
cin >>N>>M;
// vector<int> A(N);
// for(int i=0; i<N; i++){cin>>A[i];}
// vector<vector<int>> A(N,vector<int>(M));
// for(int i=0; i<N; i++){for(int j=0; j<M; j++){cin>>A[i][j];}}
if(M%N==0)cout<<-1<<endl;
  else{i=2;
  while(N<1e18){N*=i;i++;if(N%M!=0)cout<<N<<endl;}
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: 'i' was not declared in this scope
   15 |   else{i=2;
      |        ^
Language: C++

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define INF 100000000
using namespace std;

int main() {
 
int N,M;
cin >>N>>M;
// vector<int> A(N);
// for(int i=0; i<N; i++){cin>>A[i];}
// vector<vector<int>> A(N,vector<int>(M));
// for(int i=0; i<N; i++){for(int j=0; j<M; j++){cin>>A[i][j];}}
if(M%N==0)cout<<-1<<endl;
  else{i=2;
  while(N<1e18){N*=i;i++;if(N%M!=0)cout<<N<<endl;}
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: 'i' was not declared in this scope
   15 |   else{i=2;
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  long A, B;
  cin >> A >> B;
  if(A % B == 0){
    cout << -1 << endl;
    return 0;
  }
  long count = 1;
  while(1){
    if((count * A) % B != 0){
      cout << count * A << endl;
      retrn 0;
    }
    count++;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'retrn' was not declared in this scope
   14 |       retrn 0;
      |       ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
const ll INF=1001001001;
const ll LINF=1001001001001001001;
#define overload4(_1,_2,_3,_4,name,...) name
#define rep1(n) for(ll i=0;i<(n);++i)
#define rep2(i,n) for(ll i=0;i<(n);++i)
#define rep3(i,a,b) for(ll i=(a);i<(b);++i)
#define rep4(i,a,b,c) for(ll i=(a);i<(b);i+=(c))
#define rep(...) overload4(__VA_ARGS__,rep4,rep3,rep2,rep1)(__VA_ARGS__)
#define all(x) (x).begin(),(x).end()
#define vec vector<ll>
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T &a,const T &b){if(b<a){a=b;return 1;}return 0;}

#include "../../sample/solve.cpp"

void solve(ll x, ll y){
    cout<<f(x,y)<<'\n';
}

int main(){
    ll x;
    scanf("%lld",&x);
    ll y;
    scanf("%lld",&y);
    solve(x, y);
}


Compiler output:
a.cc:17:10: fatal error: ../../sample/solve.cpp: No such file or directory
   17 | #include "../../sample/solve.cpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

		IDENTIFICATION DIVISION.
        PROGRAM-ID. AtCoder.
      
        ENVIRONMENT DIVISION.
      
        DATA DIVISION.
        WORKING-STORAGE SECTION.
        01 INP PIC X(100).
        01 A PIC 9(11).
        01 B PIC 9(11).
        01 C PIC 9(11).
	    01 temp1 PIC 9(11).
        01 temp2 PIC 9(11).
        01 N PIC 9(11).
      
        PROCEDURE DIVISION.
      	MAIN.
			ACCEPT INP.
        	PERFORM VARYING temp1 FROM 1 BY 1
            UNTIL INP(temp1:1)=SPACE
        	END-PERFORM.
        	SUBTRACT 1 FROM temp1.
        	MOVE INP(1:temp1) TO A.
        	ADD 2 TO temp1.
        	PERFORM VARYING temp2 FROM temp1 BY 1
            UNTIL INP(temp2:1)=SPACE
        	END-PERFORM.
        	COMPUTE N=temp2 - temp1.
        	MOVE INP(temp1:N) TO B.
			COMPUTE C = A / B.
            COMPUTE C = C * B.
			IF A = C THEN
				DISPLAY "-1"
			ELSE 
				DISPLAY A
			END-IF.
		STOP RUN.

Compiler output:
a.cc:1:17: error: 'IDENTIFICATION' does not name a type
    1 |                 IDENTIFICATION DIVISION.
      |                 ^~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
using vl = vector<ll>;
using vvl = vector<vl>;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}
long long gcd(long long a, long long b) {
    for(;;) {
        if(a == 0)
            return b;
        b %= a;
        if(b == 0)
            return a;
        a %= b;
    }
}

long long lcm(long long a, long long b) {
    long long temp = gcd(a, b);
    return temp ? (a / temp * b) : 0;
}
long long gcd(long long a, long long b) {
    for(;;) {
        if(a == 0)
            return b;
        b %= a;
        if(b == 0)
            return a;
        a %= b;
    }
}

long long lcm(long long a, long long b) {
    long long temp = gcd(a, b);
    return temp ? (a / temp * b) : 0;
}

int main() {
    ll X, Y;
    cin >> X >> Y;
    if(X == Y) {
        cout << 0 << endl;
        return 0;
    }
    if(lcm(X, Y) == X) {
        cout << 0 << endl;
        return 0;
    }
    ll Z = X;
    while(Z < 1000000000) {
        if(Z % Y != 0) {
            cout << Z << endl;
            return 0;
        }
        Z += X;
    }
    cout << -1 << endl;
    return 0;
}

Compiler output:
a.cc:50:11: error: redefinition of 'long long int gcd(long long int, long long int)'
   50 | long long gcd(long long a, long long b) {
      |           ^~~
a.cc:35:11: note: 'long long int gcd(long long int, long long int)' previously defined here
   35 | long long gcd(long long a, long long b) {
      |           ^~~
a.cc:61:11: error: redefinition of 'long long int lcm(long long int, long long int)'
   61 | long long lcm(long long a, long long b) {
      |           ^~~
a.cc:46:11: note: 'long long int lcm(long long int, long long int)' previously defined here
   46 | long long lcm(long long a, long long b) {
      |           ^~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
using vl = vector<ll>;
using vvl = vector<vl>;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}
long long gcd(long long a, long long b) {
    for(;;) {
        if(a == 0)
            return b;
        b %= a;
        if(b == 0)
            return a;
        a %= b;
    }
}

long long lcm(long long a, long long b) {
    long long temp = gcd(a, b);
    return temp ? (a / temp * b) : 0;
}

int main() {
    ll X, Y;
    cin >> X >> Y;
    ll Z = X;
    while(Z < 1000000000) {
        if(Z % Y != 0) {
            cout << Z << endl;
            return 0;
        }
        Z += X
    }
    cout << -1 << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:15: error: expected ';' before '}' token
   60 |         Z += X
      |               ^
      |               ;
   61 |     }
      |     ~
Language: C++

#include <iostream>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <limits>
#include <vector>
#define ll long long
#define rep(i,n) for(int i = 0;i < n;i++)
#define pb push_back
#define mp make_pair

using namespace std;

int main(){
    int a,b;
    cin >> a >> b;
    int tmp = a;
    if(a == b){
        cout << -1 << endl;
    }
    else
    {
        while(tmp%b == 0){
            tmp+=a;
            if(a > 1e18){
                cout << -1 <<endl;
                return;
            }
        }
        cout << tmp << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   27 |                 return;
      |                 ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;

int main() {
  int A, B;
  cin >> A >> B;
  if (B % A == 0){
    cout << -1 << endl;
    return 0;
  else {
    cout << A << endl;
  }
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: expected '}' before 'else'
   13 |   else {
      |   ^~~~
a.cc:10:18: note: to match this '{'
   10 |   if (B % A == 0){
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef vector<long long> vll;
int main(){
  int n,cnt=0;cin >> n;
  vll a(n),b(n);
  rep(i,n)cin>>a[i];
  rep(i,n)cin>>bi];
  rep(i,n){
	int x = b[i] - a[i];
    if(x < 0) cnt += x;
    else cnt += x/2;
  }
  if(cnt<0) puts("No");
  else puts("Yes");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'bi' was not declared in this scope; did you mean 'i'?
    9 |   rep(i,n)cin>>bi];
      |                ^~
      |                i
Language: Java

import java.util.Scanner;

public class APC001B {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] a = new int[N];
		int[] b = new int[N];
		long asum = 0;
		long bsum = 0;
		for(int i = 0;i < N;i++) {
			a[i] = sc.nextInt();
			asum += a[i];
		}
		for(int i = 0;i < N;i++) {
			b[i] = sc.nextInt();
			bsum += b[i];
		}
		sc.close();
		System.out.println(bsum - asum == N ? "Yes" : "No");
	}
}

Compiler output:
Main.java:3: error: class APC001B is public, should be declared in a file named APC001B.java
public class APC001B {
       ^
1 error
Language: C++

include<stdio.h>

int main() {
	int X, Y;
	scanf("%d%d", &X, &Y);
	if (X % Y != 0 || Y % X != ) {
		for (int i = 1; i<Y; i++)
	    {
		  if (i % Y != 0)
		  {
			 printf("%d", i*X);
			 return 0;
		  }

    	}
	}
	
	printf("-1");
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<stdio.h>
      | ^~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main (){
    long long X,Y;

    cin >> X >> Y;

    if(X%Y == 0){
        cout << "-1" << endl;
    }
    else{
        cout << X << endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: expected '}' at end of input
   14 |     }
      |      ^
a.cc:4:12: note: to match this '{'
    4 | int main (){
      |            ^
Language: C++

#include<iostream>
using namespace std;

int main (){
    long long X,Y,answer;

    cin >> X >> Y;

    if(X%Y == 0){
        cout << "-1" << endl;
    }
    else{
        cout << X << endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: expected '}' at end of input
   14 |     }
      |      ^
a.cc:4:12: note: to match this '{'
    4 | int main (){
      |            ^
Language: C++

#include<iostream>
#include<vector>cin
#include<algorithm>
using namespace std;
int main() {
	long long int X, Y;
	cin >> X;
	cin >> Y;
	if (X * Y <=1000000000000000000 && Y != 1) {
		cout << X;

	}
	else if (X * 2 <= 1000000000000000000 && Y == 1)
	{
		cout << X * 2;
	}
	else {
		cout << "-1";
	}
}

Compiler output:
a.cc:2:9: fatal error: vector>ci: No such file or directory
    2 | #include<vector>cin
      |         ^~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      long x = sc.nextLong();
      long y = sc.nextLong();
     for(long i = x;i <= (long)Math.pow(10,18),i+=x){
     	if(i%y!=0){
        	System.out.println(i);
          return;
        }
     }
      System.out.println(-1);
    }
}

Compiler output:
Main.java:7: error: ';' expected
     for(long i = x;i <= (long)Math.pow(10,18),i+=x){
                                              ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
signed main(){
  long long a,b,c=2,d=1000000000;
  cin>>a>>b;
  while(a*c<=d*1000000000){
    if(a==b){
      cout<<"-1"<<endl;
      return(0);
    }
    if(a%b==0){
      cout<<"-1"<<endl;
    if(a*c%b!=0){
      cout<<a*c<<endl;
      return(0);
    }
    else
      c++;
  }
  cout<<"-1"<<endl;
    return(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:3:14: note: to match this '{'
    3 | signed main(){
      |              ^
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;
char c;
int a, b;
int ans;
bool check()
{
    return x%y==0;
}
void solve()
{
    if (check())
        ans = -1;
    else
        ans = a*(b-1);
    return;
}
main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);
    cin >> a >> b;
    solve();
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'bool check()':
a.cc:9:12: error: 'x' was not declared in this scope
    9 |     return x%y==0;
      |            ^
a.cc:9:14: error: 'y' was not declared in this scope
    9 |     return x%y==0;
      |              ^
a.cc: At global scope:
a.cc:19:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   19 | main()
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
signed  main()
{
  long long a,b;
  cin>>a>>b;
  for(int i=2;i<=1000000;i++){
    if(a*i%b!=0&&c==-1) c=a*i;
  }
  cout<<c<<"\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'c' was not declared in this scope
    8 |     if(a*i%b!=0&&c==-1) c=a*i;
      |                  ^
a.cc:10:9: error: 'c' was not declared in this scope
   10 |   cout<<c<<"\n";
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  auto x, y;
  cin >> x >> y;
  if(x % y == 0)
    cout << -1 << endl;
  else
    cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: declaration of 'auto x' has no initializer
    5 |   auto x, y;
      |   ^~~~
a.cc:5:3: error: declaration of 'auto y' has no initializer
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<tuple>
#include<iomanip>
#include<map>
#include<queue>
#define int long long
using namespace std;

const int INF = 1e10;
const int ZERO = 0;

signed main() {
	int N;
	cin >> N;
	vector<int> A(N);
	vector<int> B(N);
	for(int i = 0;i < N;i++) {
		cin >> A.at(i);
	}
	for(int i = 0;i < N;i++) {
		cin >> B.at(i);
	}
	int Acount = 0;
	int Bcount = 0;
	for(int i = 0;i < N;i++) {
		Acount += A.at(i);
		Bcount += B.at(i);
	}
	int count = Bcount - Acount;
	int cnt = 0;
	for(int i = 0;i < N;i++) {
		if(A.at(i) > B.at(i)) {
			cnt += a - b;
		}
		else if(A.at(i) < B.at(i)) {
			if((B.at(i) - A.at(i)) % 2 == 0) {
				cnt += (B.at(i) - A.at(i)) / 2;
			}
			else {
				cnt += (B.at(i) + 1 - A.at(i)) / 2 + 1;
			}
		}
	}
	else if((count - cnt) % 3 != 0) {
		cout << "No" << endl;
	}
	else {
		cout << "Yes" << endl;
	}
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:38:32: error: 'a' was not declared in this scope
   38 |                         cnt += a - b;
      |                                ^
a.cc:38:36: error: 'b' was not declared in this scope
   38 |                         cnt += a - b;
      |                                    ^
a.cc:49:9: error: 'else' without a previous 'if'
   49 |         else if((count - cnt) % 3 != 0) {
      |         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const long long max = 1e18;
int main(){
  long long a,b,ans;
  cin>>a >>b;
  ans = a;
  bool ok = true;
  while(ok){
    if(ans%b!=0)ok = false;
    else ans+=a;
    
    if(ans>max){
      ans = -1;
      ok = false;
    }
  }
  cout<<ans<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: reference to 'max' is ambiguous
   13 |     if(ans>max){
      |            ^~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:                 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
In file included from /usr/include/c++/14/algorithm:60:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:                 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:3:17: note:                 'const long long int max'
    3 | const long long max = 1e18;
      |                 ^~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,0,n)
#define SORT(V) sort((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
using namespace std;

int main(){
  int A,B;
  cin>>A>>B;
  
  if(A%B==0) cout<<-1<<endl;
  else{
    for(int i=1; ++i){
      if(A*i%B!=0){
        cout<<A*i<<endl;
        break;
      }
    }
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:21: error: expected ';' before ')' token
   24 |     for(int i=1; ++i){
      |                     ^
      |                     ;
Language: C++

#include<bits/stdc++.h >
using namespace std;
int main()
{
	int x,y;
	cin>>x>>y;
	if(x%y!=0)
	cout<<x;
	else
	cout<<"-1"<<endl;
	return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits/stdc++.h : No such file or directory
    1 | #include<bits/stdc++.h >
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h >
using namespace std;
int main()
{
	int x,y;
	cin>>x>>y;
	for(int i=2;i<=x;++i)
	{
		if(i*x%y!=0)
		{
			int a=i*x;
			cout<<a<<endl;
			return 0;
		}
	}
	cout<<"-1"<<endl;
	return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits/stdc++.h : No such file or directory
    1 | #include<bits/stdc++.h >
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin >>A>>B;
  if(B>A)cout<<A<<endl;
  else if(A==B)cout<<-1<<endl;
  else if(A%B!=0)cout <<A<<endl;
  else{
    for(int i=0;i<1000000;i++){
      if(A*i%B!=0){
        cout << A*i << endl;
        E=1;
    }
    if(E)cout << -1 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin >>A>>B;
  if(B>A)cout<<A<<endl;
  else if(A==B)cout<<-1<<endl;
  else if(A%B!=0)cout <<A<<endl;
  else{
    for(int i=0;i<1000000;i++){
      if(A*i%B!=0)cout << A*i << endl;
    }
    else cout << -1 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else cout << -1 << endl;
      |     ^~~~
Language: Java


import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

public class Solution {

    public static void main(String[] args) throws IOException {

        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    public static class Task {

        public void solve(int testNumber, InputReader in, PrintWriter out) throws IOException {
            long x = in.nextLong();
            long y = in.nextLong();

            if (x % y == 0) {
                out.println("-1");
                return;
            }

            out.println(x * (y + 1));

        }

    }
//  }  ----------------------------------------------------------------------------
    // MAIN - INPUT - OUTPUT 

    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public Double nextDouble() {
            return Double.parseDouble(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int[] nextIntArray(int arraySize) {
            int array[] = new int[arraySize];

            for (int i = 0; i < arraySize; i++) {
                array[i] = nextInt();
            }

            return array;
        }

        public char[][] nextMatrix(int row, int col) {

            char[][] m = new char[row][col];

            for (int i = 0; i < row; i++) {

                m[i] = next().toCharArray();
            }
            return m;
        }

    }
}


Compiler output:
Main.java:10: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
       ^
1 error
Language: C++

#include<iostream>
using namespace std;
define int long long

signed main(){
	int x,y;cin>>x>>y;
    if((x%y)==0)cout<<-1<<endl;
    else cout<<x<<endl;
}

Compiler output:
a.cc:3:1: error: 'define' does not name a type
    3 | define int long long
      | ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(void)
{
  long long int x,y;
  cin>>x>>y;
  if(x%y==0)
    cout<<-1<<endl;
  else
    cout<<x<<endl;
  }
}


Compiler output:
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(void)
{
  long long itn x,y;
  cin>>x>>y;
  if(x%y==0)
    cout<<-1<<endl;
  else
    cout<<x<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected initializer before 'x'
    6 |   long long itn x,y;
      |                 ^
a.cc:7:8: error: 'x' was not declared in this scope
    7 |   cin>>x>>y;
      |        ^
a.cc:7:11: error: 'y' was not declared in this scope; did you mean 'yn'?
    7 |   cin>>x>>y;
      |           ^
      |           yn
a.cc: At global scope:
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(void)
{
  int x,y;
  int ans;
  int i=1;
  cin>>x>>y;
  if(x==y||x==1||y==1)
    cout<<-1<<endl;
  else{
    int maxn=max(x,y);
    int min=min(x,y);
    while(1){
      if(maxn*i%minn==0){
        ans=maxn*i%minn;
        break;
      }
      i++
    }
    cout<<ans<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 'min' cannot be used as a function
   14 |     int min=min(x,y);
      |             ~~~^~~~~
a.cc:16:17: error: 'minn' was not declared in this scope; did you mean 'min'?
   16 |       if(maxn*i%minn==0){
      |                 ^~~~
      |                 min
a.cc:20:10: error: expected ';' before '}' token
   20 |       i++
      |          ^
      |          ;
   21 |     }
      |     ~
Language: Java

import java.util.Scanner;

public class A_APC001_TwoIntegers {

	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();
		int Y = sc.nextInt();

		int xa = X*2;
		if(X%Y == 0) {
			System.out.println(-1);
			return;
		}

		while(xa%Y == 0 && xa < Math.pow(10, 18)) {
			xa += X;
		}

		if(xa > Math.pow(10, 18)) {
			System.out.println(-1);
		}else {
			System.out.println(xa);
		}
	}
}


Compiler output:
Main.java:3: error: class A_APC001_TwoIntegers is public, should be declared in a file named A_APC001_TwoIntegers.java
public class A_APC001_TwoIntegers {
       ^
1 error
Language: C++

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

int gcd(int a, int b) {return b == 0 ? a : gcd(b, a % b);}

#define ll int
#define pb push_back
#define ld long double
#define mp make_pair
#define F first
#define S second
#define pii pair<ll,ll> 

using namespace :: std;

const ll maxn=1e5+500;
const ll inf=1e9+800;
const ll mod=1e9+7;


ll ask(ll a){
	cout<<a<<endl;
	string s;
	cin>>s;
	if(s=="Vacant"){
		exit(0);
	}
	if(s=="Male")return 0;
	return 1;
}

void solve(ll l,ll r,ll a,ll b){
	if(
	ll mid=(l+r+1)/2;
	ll c=ask(mid);
	if((l%2 == mid%2)==(c==a)){
		solve(mid,r,c,b);
	}
	solve(l,mid,a,c);
}
int main(){
	ll n;
	cin>>n;
	solve(0,n-1,ask(0),ask(n-1));
}




















Compiler output:
a.cc: In function 'void solve(int, int, int, int)':
a.cc:86:22: error: expected ')' before ';' token
   86 |         ll c=ask(mid);
      |                      ^
      |                      )
a.cc:84:11: note: to match this '('
   84 |         if(
      |           ^
a.cc:87:20: error: 'mid' was not declared in this scope; did you mean 'mod'?
   87 |         if((l%2 == mid%2)==(c==a)){
      |                    ^~~
      |                    mod
a.cc:87:29: error: 'c' was not declared in this scope
   87 |         if((l%2 == mid%2)==(c==a)){
      |                             ^
a.cc:90:17: error: 'mid' was not declared in this scope; did you mean 'mod'?
   90 |         solve(l,mid,a,c);
      |                 ^~~
      |                 mod
a.cc:90:23: error: 'c' was not declared in this scope
   90 |         solve(l,mid,a,c);
      |                       ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	long long x,y;cin >> x>> y;
	if (x%y==0|| x==1 || y==1){
		cout << -1 << endl;
	} else {
		ll z;
		for(int i=2;i<y;++i){
			z=i*x;
			if(z%y!=0) break;
		}
		if(z<(long long)pow(10,18)){
			cout << z << endl;
		} else {
			cout << -1 << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'll' was not declared in this scope
    9 |                 ll z;
      |                 ^~
a.cc:11:25: error: 'z' was not declared in this scope
   11 |                         z=i*x;
      |                         ^
a.cc:14:20: error: 'z' was not declared in this scope
   14 |                 if(z<(long long)pow(10,18)){
      |                    ^
a.cc:14:33: error: 'pow' was not declared in this scope
   14 |                 if(z<(long long)pow(10,18)){
      |                                 ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(void)
{
  int x,y;
  cin>>x>>y;
  int i=1;
  long long d=0;
  while(d%y!=0){
    d=i*x;
    i++
  }
  cout<<d<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: expected ';' before '}' token
   12 |     i++
      |        ^
      |        ;
   13 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;

int main () {
    int X, Y; cin >> X >> Y;

    if (X % Y == 0) cout << -1 << endl;
    else {
        int i = 1
        while (1) {
            i *= X;
            if (i % Y != 0) break;
        }
        cout << i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ',' or ';' before 'while'
   11 |         while (1) {
      |         ^~~~~
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:5:13: note: to match this '{'
    5 | int main () {
      |             ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>
using namespace std;
int main() {
  int x,y;
  cin >> x >> y;
  if(x%y==0||y%x==0) {
    cout << -1 << endl;
  }
  else {
    cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int X,Y;cin>>X>>Y;
  int ans;
  if(X%Y==0)ans=-1;
  else {
    for(int i=0;;i++){
      if(i*X%Y!=0){ans=i*X;break}
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:33: error: expected ';' before '}' token
    9 |       if(i*X%Y!=0){ans=i*X;break}
      |                                 ^
      |                                 ;
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long unsigned int ll;
 
int main() {
 
  int a,b,c;
  cin >> a;
  cin >>b;
  
  if(a%b==0){
    cout <<-1 <<endl;
    return 0;
  }else{
    cout <<a<<endl;
    return 0;
  }



Compiler output:
a.cc: In function 'int main()':
a.cc:20:4: error: expected '}' at end of input
   20 |   }
      |    ^
a.cc:8:12: note: to match this '{'
    8 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long unsigned int ll;
 
int main() {
 
  int a,b,c;
  cin >> a;
  cin >>b;
  
  if(a%b==0){
    cout <-1 <<endl;
    return 0;
  }else{
    cout <<a<<endl;
    return 0;
  }



Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   15 |     cout <-1 <<endl;
      |           ~~~^~~~~~
a.cc:20:4: error: expected '}' at end of input
   20 |   }
      |    ^
a.cc:8:12: note: to match this '{'
    8 | int main() {
      |            ^
Language: C++

#include <Stdio.h>

int main(void) {
	int n, m;
	scanf("%d %d", &n, &m);

	if (n % m == 0) {
		printf("-1\n");
	}
	else
		printf("%d\n", n);
}

Compiler output:
a.cc:1:10: fatal error: Stdio.h: No such file or directory
    1 | #include <Stdio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>

using namespace std;
using llong = long long;
using P = pair<llong, llong>;

#define BE(x) x.begin(), x.end()

const llong inf = llong(1e18)+7;
const llong mod = 1e9+7;

map<llong, int> PrimeFact(llong n){
	map<llong, int> ret;
	while(n % 2 == 0){
		ret[2]++;
		n /= 2;
	}
	for(llong i = 3; i*i <= n; i += 2){
		while(n%i == 0){
			ret[i]++;
			n /= i;
		}
	}
	if(n != 1)
	ret[n]++;

	return ret;
}

int main(){
	llong x,y;

	cin >> x >> y;
	auto m = PrimeFact(x);
	for(auto x : m)
		if(y%x->first == 0){
			cout << x->first << endl;
			return 0;
		}

	cout << -1 << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:23: error: base operand of '->' has non-pointer type 'std::pair<const long long int, int>'
   36 |                 if(y%x->first == 0){
      |                       ^~
a.cc:37:34: error: base operand of '->' has non-pointer type 'std::pair<const long long int, int>'
   37 |                         cout << x->first << endl;
      |                                  ^~
Language: C

#include <stdio.h>
int main(void){
  int a,b,n;
  if(a==b){printf("-1");}
  n=a;
 for(;;){
 if((n%b==0)&&(n%a!=0)){break;}
 n=n+1
 }
  printf("%d",n);
  
  
  reutrn 0;}

Compiler output:
main.c: In function 'main':
main.c:8:7: error: expected ';' before '}' token
    8 |  n=n+1
      |       ^
      |       ;
    9 |  }
      |  ~     
main.c:13:3: error: 'reutrn' undeclared (first use in this function)
   13 |   reutrn 0;}
      |   ^~~~~~
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:9: error: expected ';' before numeric constant
   13 |   reutrn 0;}
      |         ^~
      |         ;
Language: C++

#include <bits/stdc++.h>
#include <unordered_map>
typedef long long ll;
#define rep(i,m,n) for(ll i = (m); i < (n); i++)
#define rrep(i,m,n) for(ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define print2(x,y) cout << (x) << " " << (y) << endl;
#define printa(x,n) for(ll i = 0; i < n; i++){ cout << (x[i]) << " \n"[i == n-1];}
#define printp(x,n) for(ll i = 0; i < n; i++){ cout << "(" << x[i].first << ", " << x[i].second << ") "; } cout << endl;
#define INF (1e18)
using namespace std;
const ll MOD = 1e9 + 7;
typedef pair<ll, ll> lpair;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll x,y;
    cin >> x >> y;
    if(x % y != 0){
        print(x):
    }else{
        print(-1);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: expected primary-expression before ':' token
   21 |         print(x):
      |                 ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<string>
#include<vector>
#include<set>
#include<cctype>
using namespace std;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const long long INF=1LL<<60;

int main(void){
	ios::sync_with_stdio(false); cin.tie(0);
	
	int a,b;
	cin>>a>>b;
	if(y%x!=0)cout<<x<<endl;
	else cout<<-1<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: 'y' was not declared in this scope
   19 |         if(y%x!=0)cout<<x<<endl;
      |            ^
a.cc:19:14: error: 'x' was not declared in this scope
   19 |         if(y%x!=0)cout<<x<<endl;
      |              ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  if(a%b==0){
    cout<<"-1"<<endl;
    return 0;
  }
  unsigned long long ov=1000000000000000000,ab=a*b;
  if(ab>ans){
    cout<<"-1"<<endl;
    return 0;
  }
  while(ab>=0){
    if(ab%a==0&&ab%b!=0){
      cout<<ab<<endl;
      return 0;
    }
    ab--;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   if(ab>ans){
      |         ^~~
      |         abs
Language: C++

#include<bits/stdc++.h>
using namespace std ;

int main () {
  int a , b ;
  cin >> a >> b ;
  
  bool pre = false ;
  
  if( max(a,b) % min(a,b) == 0 ) {
    cout << -1 << endl ;
    pre = true ;
  }
  
  while(pre){
    int i = 1 ;
    i++ ;
    if( a * i % b != 0 ) {
      cout << a *i << endl ;
      bleak ;
      pre = true ;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:7: error: 'bleak' was not declared in this scope
   20 |       bleak ;
      |       ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
#define ll long long
#define endl '\n'
using namespace std;


int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
  int x, y;
  cin >> x >> y;
  if (x % y == 0 || y % x == 0) {
    cout << -1 << endl;
    return 0;
  }

  ll int lcm = x * y / __cd(x, y);
  for (int i = 0; i < lcm; i++) {
    if (i % x == 0 && i % y != 0) {
      cout << i << endl;
      return 0;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:24: error: '__cd' was not declared in this scope
   19 |   ll int lcm = x * y / __cd(x, y);
      |                        ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <stack>
#include <functional>
#define rep(i, n) for(int i = 0; i < n; i++)
#define ll long long
#define endl '\n'
using namespace std;


int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
  int x, y;
  cin >> x >> y;
  if (x % y == 0 || y % x == 0) {
    cout << -1 << endl;
    return 0;
  }

  ll int lcm = x * y / __algo_gcd(x, y);
  for (int i = 0; i < lcm; i++) {
    if (i % x == 0 && i % y != 0) {
      cout << i << endl;
      return 0;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:24: error: '__algo_gcd' was not declared in this scope
   27 |   ll int lcm = x * y / __algo_gcd(x, y);
      |                        ^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	long long a,b;
  	cin>>a>>B;
  	if(a%b==0){
      	cout<<-1<<endl;
      	return 0;
    }
	for(int i=0;i<10000000000000000000;i++){
		if(i%a==0&&i%b!=0){
			cout<<i<<endl;
          	break;
        }
      	else{
        }
    }
}

Compiler output:
a.cc:10:23: warning: integer constant is so large that it is unsigned
   10 |         for(int i=0;i<10000000000000000000;i++){
      |                       ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:17: error: 'B' was not declared in this scope
    5 |         cin>>a>>B;
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	long long a,b;
  	cin>>a>>B;
  	if(a%b==0){
      	cout<<-1<<endl;
      	return 0;
    }
	for(int i=0;l<10000000000000000000;i++){
		if(i%a==0&&i%b!=0){
			cout<<i<<endl;
          	break;
        }
      	else{
        }
    }
}

Compiler output:
a.cc:10:23: warning: integer constant is so large that it is unsigned
   10 |         for(int i=0;l<10000000000000000000;i++){
      |                       ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:17: error: 'B' was not declared in this scope
    5 |         cin>>a>>B;
      |                 ^
a.cc:10:21: error: 'l' was not declared in this scope
   10 |         for(int i=0;l<10000000000000000000;i++){
      |                     ^
Language: C++

#define debug_interval ','
#define dump_interval ' '
#define debug_toggle 1
//{
#include<bits/stdc++.h>
using namespace std;
#define hi cout<<"hi"<<endl;
#define int long long
#define INT_MAX LLONG_MAX
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep1(i,n) for(int i=1;i<=(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define fi first
#define se second
#define mp make_pair
#define rev reverse
#define dans dump(ans)
#define MOD 1000000007
#define amp(v,n) (v).count(n)?v[n]++:v[n]=1;

//{
inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class...A> inline void dump(){cout<<endl;}
template<class...A> inline void dump_rest() {cout<<endl;}
template<class T, class...A> inline void dump_rest(const T& first, const A&... rest){cout<<dump_interval<<first;dump_rest(rest...);}
template<class T,class...A> inline void dump(const T&first,const A&...rest){cout<<first;dump_rest(rest...);}
template<class...A> inline void debug(){cerr<<endl;}
template<class...A> inline void debug_rest() {cerr<<endl;}
template<class T, class...A> inline void debug_rest(const T& first, const A&... rest){cerr<<debug_interval<<first;debug_rest(rest...);}
template<class T,class...A> inline void debug(const T&first,const A&...rest){if(debug_toggle)cerr<<first,debug_rest(rest...);}
//}

typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}
template<int m>class mint{private:int i;public:mint() : i(0){}mint(int i): i((i%m+m)%m){}mint operator+(const mint& o){return o.i+i;}mint operator*(const mint& o){return o.i*i;}mint operator-(){return -i;}operator int() {return i;}};

int x,y;

main(){
    cin>>x>>y;
    cout<<(x%y==0)?-1:x*MOD)<<endl;
}



Compiler output:
a.cc:9:9: warning: "INT_MAX" redefined
    9 | #define INT_MAX LLONG_MAX
      |         ^~~~~~~
In file included from /usr/include/c++/14/climits:42,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:38,
                 from a.cc:5:
/usr/lib/gcc/x86_64-linux-gnu/14/include/limits.h:120:9: note: this is the location of the previous definition
  120 | #define INT_MAX __INT_MAX__
      |         ^~~~~~~
a.cc:46:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   46 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:48:28: error: expected ';' before ')' token
   48 |     cout<<(x%y==0)?-1:x*MOD)<<endl;
      |                            ^
Language: C++

#include <iostream>

using namespace std;

int main(void)
{
    int X, Y;
    cin >> X >> Y;
    cout << ((X % Y) X : -1) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: expected ')' before 'X'
    9 |     cout << ((X % Y) X : -1) << endl;
      |             ~       ^~
      |                     )
Language: C++

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <map>
#include <vector>
#include <list>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <string>
#include <queue>
#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <iomanip>        //do setprecision
#include <ctime>
#include <complex>
using namespace std;

#define FOR(i,b,e) for(int i=(b);i<(e);++i)
#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)
#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)
#define REP(x, n) for(int x = 0; x < (n); ++x)

#define ST first
#define ND second
#define PB push_back
#define MP make_pair
#define LL long long
#define ULL unsigned LL
#define LD long double

const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
const int mod=1000000007;

int main(){
	LL x,y;
	cin>>x>>y;
	if(x%y==0){
		cout<<-1
	}else{
		FOR(i,1,y){
			if((1LL*i*x)%y!=0){
				cout<<1LL*i*x<<endl;
				break;
			}
		}
	}
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:25: error: expected ';' before '}' token
   42 |                 cout<<-1
      |                         ^
      |                         ;
   43 |         }else{
      |         ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,s;
    cin>>a>>s;
    if(a%s) cout<<a;
    else cout<<-1;
    puts(' ');
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    9 |     puts(' ');
      |          ^~~
      |          |
      |          char
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,s;
    cin>>a>>s;
    if(a%s) cout<<a;
    else cout<<-1;
    put(' ');
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'put' was not declared in this scope; did you mean 'putw'?
    9 |     put(' ');
      |     ^~~
      |     putw
Language: C++

#include<iostream>
int main(){
    ios::sync_with_stdio(0);
    int x,y;
    std::cin>>x>>y;
    if(x%y)std::cout<<x<<std::endl;
    else std::cout<<-1<<std::endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'ios' has not been declared
    3 |     ios::sync_with_stdio(0);
      |     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{ 
    int x,y;
    cin>>x>>y;
    if(x%y)cout<<x;/
    else cout<<-1;
    puts("");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected primary-expression before '/' token
    7 |     if(x%y)cout<<x;/
      |                    ^
a.cc:8:5: error: expected primary-expression before 'else'
    8 |     else cout<<-1;
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int x,y;
    cin>>x>>;
    if(x%y) cout<<x<<endl;
    else cout<<-1<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: expected primary-expression before ';' token
    5 |     cin>>x>>;
      |             ^
Language: C++

#include <iostream>
using namespace std;
int main(){
    int x,y;
    cin>>x>>y
    if(x%y) cout<<x<<endl;
    else cout<<-1<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: expected ';' before 'if'
    5 |     cin>>x>>y
      |              ^
      |              ;
    6 |     if(x%y) cout<<x<<endl;
      |     ~~        
a.cc:7:5: error: 'else' without a previous 'if'
    7 |     else cout<<-1<<endl;
      |     ^~~~