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

#include <bits/stdc++.h>
usign namespace std;
int gcd(int x, int y){//再起を使ってgcdを作れる。
    
    if(x%y==0){
        return y;
    }
    
    return gcd(y,x%y);
}

int main(){ //gcdを使えばlcmを作れる。
    
    int x,y;
    cin >> x >> y;
    cout << x*y/gcd(x,y) << endl;

Compiler output:
a.cc:2:1: error: 'usign' does not name a type
    2 | usign namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:15:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   15 |     cin >> x >> y;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     cout << x*y/gcd(x,y) << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |     cout << x*y/gcd(x,y) << endl;
      |                             ^~~~
      |                             std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:16:34: error: expected '}' at end of input
   16 |     cout << x*y/gcd(x,y) << endl;
      |                                  ^
a.cc:12:11: note: to match this '{'
   12 | int main(){ //gcdを使えばlcmを作れる。
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b){
  if(ll==0)  return a;
  return gcd(b, a%b);
}
int main(){
    ll a, b;
    cin >> a >> b;
    cout << (a/gcd(a,b))*b << endl;
    return 0;
}


Compiler output:
a.cc: In function 'll gcd(ll, ll)':
a.cc:5:8: error: expected unqualified-id before '==' token
    5 |   if(ll==0)  return a;
      |        ^~
Language: C++

import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long A = sc.nextLong();
		long B = sc.nextLong();
		
		for (int i=1; i<=B; i++) {
			if ((A*i)%B == 0) {
				System.out.println(A * i);
				return;
			}
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
    4 |         public static void main(String[] args) {
      |               ^~~~~~~
      |               :
a.cc:4:33: error: 'String' has not been declared
    4 |         public static void main(String[] args) {
      |                                 ^~~~~~
a.cc:4:42: error: expected ',' or '...' before 'args'
    4 |         public static void main(String[] args) {
      |                                          ^~~~
a.cc:16:2: error: expected ';' after class definition
   16 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:17: error: 'Scanner' was not declared in this scope
    5 |                 Scanner sc = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:6:26: error: 'sc' was not declared in this scope
    6 |                 long A = sc.nextLong();
      |                          ^~
a.cc:11:33: error: 'System' was not declared in this scope
   11 |                                 System.out.println(A * i);
      |                                 ^~~~~~
Language: C++

import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
a, b = i2()
a = min(a,b)
b = max(a,b)
for i in range(1,b+1):
    if a*i%b == 0:
        print(a*i)
        exit()


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include <string>
#include <math.h>
#include <iomanip>

using namespace std;

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

  while (1)
  {
    int count = 0;
    for (int i = 1; i*i <= X; ++i)
    {
      if (X%i == 0)
      {
        if (i*i != X) count += 2;
        else ++count;
      }
    }

    if (count == 2)
    {
      cout << X << endl;
      return;
    }
    ++X;
  }
}


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

#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include <string>
#include <math.h>
#include <iomanip>

using namespace std;

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

  while (1)
  {
    int count = 0;
    for (int i = 1; i*i <= X; ++i)
    {
      if (X%i == 0)
      {
        if (i*i != X) count += 2;
        else ++count;
      }
    }

    if (count == 2)
    {
      cout << X << endl;
      return;
    }
    ++X;
  }
}

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

#include<stdio.h>
#include<math.h>
#include<limits.h>
#include<assert.h>
#include<stdbool.h>
#include<stddef.h>
#include<stdint.h>
#include<string.h>
#include<unistd.h>
#include<stdlib.h>
#include<bits/stdc++.h>
#include<ctype.h>
#include<time.h>
typedef long long ll;
#define pi 3.14159
using namespace std;
int main()
{ 
ll x,y;scanf("%lld%lld",&x,&y);
    printf("%lld",x*y/__gcd(x,y));
    
return 0;
}

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

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

int main(){
  long long a, b, c;
  cin >> a >> b;
  c = max(a, b);
  while(){
    if(c % a == 0 && c % b == 0){
      cout << c << endl;
      return 0;
    }
    else
      c++;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected primary-expression before ')' token
    8 |   while(){
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef int64_t ll;
typedef long double ld;
const ll MOD=1000000007;
#define loop(i,n) for(ll i=0;i<(ll)(n);i++)
int change(ll a,ll b){
    ll c=a;
    a=b;
    b=c
}
long long gcd(long long a,long long b){
    ll gcdmax=max(a,b);
    ll gcdmin=min(a,b);
    while(){
        if(gcdmax%gcdmin==0)break;
        else gcdmax%=gcdmin;
        change(gcdmin,gcdmax);
    }
    return d;
}
int main()
{
  ll A,B;
  cin>>A>>B;
  cout<<A*B/gcd(A,B)<<endl;
}

Compiler output:
a.cc: In function 'int change(ll, ll)':
a.cc:10:8: error: expected ';' before '}' token
   10 |     b=c
      |        ^
      |        ;
   11 | }
      | ~       
a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
a.cc: In function 'long long int gcd(long long int, long long int)':
a.cc:15:11: error: expected primary-expression before ')' token
   15 |     while(){
      |           ^
a.cc:20:12: error: 'd' was not declared in this scope
   20 |     return d;
      |            ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

int main(){
	long long int a, b;
	cin >> a >> b;
	long long int ans = a*b;
	for (int i = 50000; i > 1; i--){
			ans /= i;
		}
	}

	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc:16:9: error: 'cout' does not name a type
   16 |         cout << ans << endl;
      |         ^~~~
a.cc:17:9: error: expected unqualified-id before 'return'
   17 |         return 0;
      |         ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vii = vector<vi>;
using in6 = int64_t;
using ind = double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  int a,b;
  cin >> a >> b;
  int s = max(a,b);
  int t = min(a,b);
  while(true) {
    s = s % t;
    if(s == 0) {
      cout << s << endl;
      break;
    }
    t = t % s;
    if(t == 0) {
      cout << t << endl;
      break;
    }
  }

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

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();  
    long x = a * b;
    long = r;
    
  if(a<b){
    long tmp = a;
    a = b;
    b = tmp;
  }
 
  /* ユークリッドの互除法 */
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
    
    System.out.println(x/b);
    
  }
}


Compiler output:
Main.java:8: error: not a statement
    long = r;
    ^
Main.java:8: error: ';' expected
    long = r;
        ^
Main.java:8: error: not a statement
    long = r;
           ^
3 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();  
    long x = a * b;
    
  if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }
 
  /* ユークリッドの互除法 */
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
    
    System.out.println(x/b);
    
  }
}

Compiler output:
Main.java:10: error: cannot find symbol
    tmp = a;
    ^
  symbol:   variable tmp
  location: class Main
Main.java:12: error: cannot find symbol
    b = tmp;
        ^
  symbol:   variable tmp
  location: class Main
Main.java:16: error: cannot find symbol
  r = a % b;
  ^
  symbol:   variable r
  location: class Main
Main.java:17: error: cannot find symbol
  while(r!=0){
        ^
  symbol:   variable r
  location: class Main
Main.java:19: error: cannot find symbol
    b = r;
        ^
  symbol:   variable r
  location: class Main
Main.java:20: error: cannot find symbol
    r = a % b;
    ^
  symbol:   variable r
  location: class Main
6 errors
Language: C++

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

int main()
{
  int A,B;
  cin >> A >> B;
  
  if(B > A){
    val = A;
    A = B;
    B = val;
  }
  
  while(val != 0){
    ans = A / B;
    val = A % B;
    A = B;
    B = val;
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'val' was not declared in this scope
   10 |     val = A;
      |     ^~~
a.cc:15:9: error: 'val' was not declared in this scope
   15 |   while(val != 0){
      |         ^~~
a.cc:16:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |     ans = A / B;
      |     ^~~
      |     abs
a.cc:22:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C

#include <stdio.h>
#include <string.h>

int main(void)
{
  char buff[100];
  fgets(STDIN, sizeof buff, buff);

  int a, b;
  a = atoi(strtok(buff, " "));
  b = atoi(strtok(NULL, " "));
  
  int ax =1, bx = 1;
  while (a * ax != b * bx) {
    if (a * ax < b * bx) {
      ax++;
    } else {
      bx++;
  	}
  }
  printf("%d", a * ax);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: 'STDIN' undeclared (first use in this function)
    7 |   fgets(STDIN, sizeof buff, buff);
      |         ^~~~~
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:29: error: passing argument 3 of 'fgets' from incompatible pointer type [-Wincompatible-pointer-types]
    7 |   fgets(STDIN, sizeof buff, buff);
      |                             ^~~~
      |                             |
      |                             char *
In file included from main.c:1:
/usr/include/stdio.h:654:69: note: expected 'FILE * restrict' but argument is of type 'char *'
  654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |                                                    ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:10:7: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   10 |   a = atoi(strtok(buff, " "));
      |       ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
/*//最大公約数
int gcd(long a, long b) {
	if (a%b==0) {
		return b;
	}
	else {
		return gcd(b, a % b);
	}
}

//最小公倍数
int lcm(long a, long b) {
	return a * b / gcd(a, b);
}*/

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


Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: 'lcm' was not declared in this scope
   29 |         cout << lcm(A, B) << endl;
      |                 ^~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> A >> B;
      |         ^~~
a.cc:7:25: error: 'cout' was not declared in this scope
    7 |                         cout << A * i << endl;
      |                         ^~~~
a.cc:7:42: error: 'endl' was not declared in this scope
    7 |                         cout << A * i << endl;
      |                                          ^~~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << lcm(A, B) << endl;
      |         ^~~~
a.cc:11:17: error: 'lcm' was not declared in this scope
   11 |         cout << lcm(A, B) << endl;
      |                 ^~~
a.cc:11:30: error: 'endl' was not declared in this scope
   11 |         cout << lcm(A, B) << endl;
      |                              ^~~~
Language: C++

int main(void){
    cin.tie(0);
    ios::sync_with_stdio(false);

    u64 A,B;
    cin>>A>>B;
    cout<<boost::math::lcm(A, B);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:5: error: 'cin' was not declared in this scope
    2 |     cin.tie(0);
      |     ^~~
a.cc:3:5: error: 'ios' has not been declared
    3 |     ios::sync_with_stdio(false);
      |     ^~~
a.cc:5:5: error: 'u64' was not declared in this scope
    5 |     u64 A,B;
      |     ^~~
a.cc:6:10: error: 'A' was not declared in this scope
    6 |     cin>>A>>B;
      |          ^
a.cc:6:13: error: 'B' was not declared in this scope
    6 |     cin>>A>>B;
      |             ^
a.cc:7:5: error: 'cout' was not declared in this scope
    7 |     cout<<boost::math::lcm(A, B);
      |     ^~~~
a.cc:7:11: error: 'boost' has not been declared
    7 |     cout<<boost::math::lcm(A, B);
      |           ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
 
int main() {
  int a,b,ans=0;
  cin >>a>>b;
  for(int i=1;i<10000000000;i++){
    
    if(i%a=0&&i%b==0){
      ans=i;
      break;
    }
  }
  cout<<ans<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: lvalue required as left operand of assignment
   10 |     if(i%a=0&&i%b==0){
      |        ~^~
Language: C++

#incdlue<bits/stdc++.h>
using namespace std;
int main(){
 long long n , m ;
 cin >> n >> m ;
 long long u = n * m ;
 cout << u << endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incdlue; did you mean #include?
    1 | #incdlue<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:2: error: 'cin' was not declared in this scope
    5 |  cin >> n >> m ;
      |  ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incdlue<bits/stdc++.h>
a.cc:7:2: error: 'cout' was not declared in this scope
    7 |  cout << u << endl;
      |  ^~~~
a.cc:7:2: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:15: error: 'endl' was not declared in this scope
    7 |  cout << u << endl;
      |               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incdlue<bits/stdc++.h>
Language: C++

#include <bits/stdc++.h>
#include <ctime>
#include <sstream>
#define weewoo ios::sync_with_stdio(false);cin.tie(0)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ld long double
#define ll long long
#define se second
#define fi first
#define ctoi(x) (x-'0')
#define pi (acos(-1))
#define llputin(a,n) for(int i=0;i<n;i++){ll x;cin >> x;a.push_back(x);}
#define iputin(a,n) for(int i=0;i<n;i++){int x;cin >> x;a.push_back(x);}

#define MOD ((ll) 1e9 + (ll) 7)
using namespace std;

ll pw(ll x,ll a){
    if(a==0)
        return 1;
    ll t = pw(x,a/2);
    if(a%2==0)
        return (t*t);
    else
        return (t*t*x);
}

bool prime(int x)
{
    if(x < 2) return false;
        for(int i=2; i<= sqrt(x); i++) {
            if ((x%i) == 0) return false;
        }
    return true;
}


ll lcm(int x,int y){
    return x*y/__gcd(x,y);
}

int main()
{
    weewoo;
    int a,b;
    cin >> a >> b;
    cout << min(a*b,lcm(a,b)) << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:16: error: no matching function for call to 'min(int, long long int)'
   48 |     cout << min(a*b,lcm(a,b)) << endl;
      |             ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:48:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   48 |     cout << min(a*b,lcm(a,b)) << endl;
      |             ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:48:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   48 |     cout << min(a*b,lcm(a,b)) << endl;
      |             ~~~^~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <boost/math/common_factor.hpp>
using namespace std;
 
int main()
{
	int a , b;
  	if(a == 0||b==0){if(a==0){cout << b;} if(b==0){cout << a;}
 	else{
     	cin >> a >> b;
  		cout <<boost::math::lcm(a,b) << endl;
    }
}

Compiler output:
a.cc:2:10: fatal error: boost/math/common_factor.hpp: No such file or directory
    2 | #include <boost/math/common_factor.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int gcd(int a, int b){
  if(b==0){
    return a;
  } else {
    return gcd(b,a%b);
  }
}

int main(){
  int a,b,tmp;
  scanf("%d %d",&a,*b);
  if(a<b){
    tmp=b;
    b=a;
    a=tmp;
  }
  tmp=gcd(a,b);
  printf("%d",a*b/tmp);
}

Compiler output:
main.c: In function 'main':
main.c:13:20: error: invalid type argument of unary '*' (have 'int')
   13 |   scanf("%d %d",&a,*b);
      |                    ^~
Language: C++

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

int gcd(int a, b){
  
  if(a<b){
    int c = a;
    a = b;
    b = c;
  }
  
  if(b==0){
    return a;
  }else{
    return gcd(b, a%b);
  }
}

int main(){
  int a, b; cin>>a >>b;
  cout<<a*b/gcd(a, b)<<endl;
  return 0;
}

Compiler output:
a.cc:4:16: error: 'b' has not been declared
    4 | int gcd(int a, b){
      |                ^
a.cc: In function 'int gcd(int, int)':
a.cc:6:8: error: 'b' was not declared in this scope
    6 |   if(a<b){
      |        ^
a.cc:12:6: error: 'b' was not declared in this scope
   12 |   if(b==0){
      |      ^
Language: C++

#include <iostream>
#include <numeric>
using namespace std;
int main(void){
    int a,b;
    cin >> a >> b;
    long int c;
    c = math::lcm(a,b);
    cout << c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'math' has not been declared
    8 |     c = math::lcm(a,b);
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long int
#define mod 1000000007
#define string_mod 2549536629329_base_255
#define pb push_back
#define F first
#define S second
#define ff first
#define endl "\n"
#define ss second
#define all(v) v.begin(), v.end()
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
int power(int x, unsigned int y, int p)
{
    int res = 1;
    x = x % p;
    //  cout << x << " ";
    while (y > 0)
    {

        if (y & 1)
            res = (res * x) % p;

        y = y >> 1;
        x = (x * x) % p;
    }
    return res % p;
}
int lcm(int a, int b)
{
    return (a * b) / __gcd(a, b);
}

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int tc;
    tc = 1;
    while (tc--)
    {
        int n;
        int a, b, ;
        cin >> a >> b;
        cout << lcm(a, b);
    }

    return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:49:19: error: expected unqualified-id before ';' token
   49 |         int a, b, ;
      |                   ^
Language: C++

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

long long N=0,K=0,M=0,A=0,B=0,ans=0,p=0;
long long n=0,x=0,s=0,t=0,a=0,b=0;
string S,T,ANS;

int main(){
    cin >> A >> B;
    a = max(A,B);
    b = min(A,B);
    s = min(A,B);
    long long gcd(long long a,long long b){
        if(a%b == 0) return(b);
        else return(gcd(b,a%b));
    }
    ans = a*s/gcd(a,b);

    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:43: error: a function-definition is not allowed here before '{' token
   16 |     long long gcd(long long a,long long b){
      |                                           ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  int i;
  bool c;
  c=false;
  for(i=1;i<=a;i++)
  {
    for(j=1;j<=b;j++)
    {
      if(a*j==a*i)
      { cout<<a*j;
      break;
       c=true;
      }
      if(b)
        break;
    }}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'j' was not declared in this scope
   12 |     for(j=1;j<=b;j++)
      |         ^
Language: C++

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

int main(){
  ll a,b;
  cin>>a>>b;
  cout<<a*b/__gcd(a,b);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
    5 |   ll a,b;
      |   ^~
a.cc:6:8: error: 'a' was not declared in this scope
    6 |   cin>>a>>b;
      |        ^
a.cc:6:11: error: 'b' was not declared in this scope
    6 |   cin>>a>>b;
      |           ^
Language: C++

#include<stdio.h>

int main()
{
	int a,b;
	scanf("%d %d", &a, &b);

	for (int i=1; i<=b; i++){
		if ( (a*i)%b == 0 ){
			printf("%u\n", lcm(a, b));
			break;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:40: error: 'lcm' was not declared in this scope
   10 |                         printf("%u\n", lcm(a, b));
      |                                        ^~~
Language: C++

unsigned int lcm(int a, int b)
{
	int i;
	if (a==b) return a*2;

	for (i=1; i<=b; i++){
		if ( (a*i)%b == 0 ){
			break;
		}
	}
	return a*i;
}

int main()
{
	int a,b;
	scanf("%d %d", &a, &b);

	printf("%u\n", lcm(a, b));
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'scanf' was not declared in this scope
   17 |         scanf("%d %d", &a, &b);
      |         ^~~~~
a.cc:19:9: error: 'printf' was not declared in this scope
   19 |         printf("%u\n", lcm(a, b));
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | unsigned int lcm(int a, int b)
Language: C++

#include<bits/stdc++.h>
using namespace std;
int gcd(long long a,long long b)
{
    if(b==0)
        return a;
    return 
        gcd(b,a%b);
}
int main()
{
	long long a,b;
	cin>>a>>b;
    cout<<x/gcd(x,y)*y;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'x' was not declared in this scope
   14 |     cout<<x/gcd(x,y)*y;
      |           ^
a.cc:14:19: error: 'y' was not declared in this scope
   14 |     cout<<x/gcd(x,y)*y;
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int gcd(long long a,long long b)
{
    if(b==0)
        return a;
    return 
        gcd(b,a%b);
int main()
{
	long long a,b;
	cin>>a>>b;
    cout<<gcd(a,b);
    return 0;
 }

Compiler output:
a.cc: In function 'int gcd(long long int, long long int)':
a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    9 | int main()
      |         ^~
a.cc:9:9: note: remove parentheses to default-initialize a variable
    9 | int main()
      |         ^~
      |         --
a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:10:1: error: a function-definition is not allowed here before '{' token
   10 | {
      | ^
a.cc:15:3: error: expected '}' at end of input
   15 |  }
      |   ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<iostream>
#include<bits/stdc++.h>
#include<queue>
#include<cstdio>
#include<cstring>
#include<cmath>
using namespace std;
int main()
{
	long long a,b,c;
	long long sum=0,ans=0;
	cin>>a>>b;
	if(a>=100000||b>=100000)
	{
		printf("9999900000");
		sum++;
	}
	if(sum==0)
	{
		if(a>=b)
		for(long long i=b;i<=a*b;)
		{
			if(i%a==0&&i%b==0)
			{
				printf("%d",i);
				break;
			}
			i+=b;
		}
	    if(b>a)
		for(long long j=a;j<=a*b;j++)
		{
			if(j%a==0&&j%b==0)
			{
				printf("%d",j);
				break;
			}
			i+=a;
		}
	}
	return 0;
}

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

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

int main(){
  int A, B;
  ans = 0;
  cin >> A >> B;
  int num = A;
  while(num % B != 0){
    num += A;
  }
  cout << num << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 |   ans = 0;
      |   ^~~
      |   abs
Language: C++

#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <iomanip>
#include <vector>
using namespace std;
#define ll long long
int gcd(int a, int b) {
	if (a == 0)
		return b;
	return gcd(b % a, a);
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int a, b;
	cin >> a >> b;
	cout << long long((a * b) / gcd(a, b));
	system("pause>0");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: expected primary-expression before 'long'
   20 |         cout << long long((a * b) / gcd(a, b));
      |                 ^~~~
Language: C++

#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <iomanip>
#include <vector>
using namespace std;
#define ll long long
int gcd(int a, int b) {
	if (a == 0)
		return b;
	return gcd(b % a, a);
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int a, b;
	cin >> a >> b;
	cout << ll((a * b) / gcd(a, b));
	system("pause>0");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected primary-expression before 'long'
    8 | #define ll long long
      |            ^~~~
a.cc:20:17: note: in expansion of macro 'll'
   20 |         cout << ll((a * b) / gcd(a, b));
      |                 ^~
Language: C++

//保留所有权利。
#include<iostream>
#include<stdio.h>//printするよ
#include<vector>
#include<algorithm>//辞書順はnext_permutationだよ
#include<set>
#include<string>
#include<string.h>
#include<time.h>
#include<random>
#include<cmath>
#include<math.h>
#include<queue>
#include<time.h>
#include<iomanip>
#include<utility>//swapで数値交換するよ
//END OF LIBRARIES.
#define rt "\n"//改行を最速化させるよ
#define rep(i,n) for(int i=0;i<n;i++)
#define rop(i,n) for(int i=1;i<=n;i++)
#define drep(i,n) for(int i=n-1;0<=i;i--)
#define yes(ans) if(ans)cout<<"yes"<<rt;else cout<<"no"<<rt;
#define Yes(ans) if(ans)cout<<"Yes"<<rt;else cout<<"No"<<rt;
#define YES(ans) if(ans)cout<<"YES"<<rt;else cout<<"NO"<<rt;
#define vcin(V) for (int i = 0; i < (V).size(); i++) { cin >> (V).at(i); }
#define sort(s) sort(s.begin(),s.end())
#define reve(s) reverse(s.begin(),s.end())
#define asas int ans=0
#define cncn int cnt=0
#define smsm int sum=0
#define nn int n=0
#define please return
#define AC 0//おまじないだよ
#define Rapid cin.tie(0);ios::sync_with_stdio(false)
//END OF DEFINE.
using namespace std;
typedef vector<int> vint;
typedef vector<string> vstr;
typedef vector<char> vcha;
typedef long long int llint;
typedef pair<int, int> pint;
typedef pair<llint, llint> pllint;
typedef vector<llint> vllint;
typedef vector<pint> vpint;
typedef vector<pair<llint, llint>> vpllint;
typedef vector<vector<int>> vvint;
typedef vector<vector<llint>> vvllint;
typedef vector<vector<pint>> vvpint;
typedef vector<bool> vbool; 
//END OF TYPEDEF.

//最大公約数（GCD）を求めるよ
//最小公倍数（LCM）は＜＜　A × B ÷ GCD　 ＞＞で求まるよ

long long GCD(long long a, long long b) {
	if (b == 0) return a;
	else return GCD(b, a % b);
}
long long LCM(long long a, long long b) {
	return a * b / GCD(a, b);
}
//BEGIN OF CODE.
int c = 0, cncn, asas;
int main(void){
	llint a, b;
	cin >> a >> b;
	cout << LCM(a,b) << rt;
	please AC;
}
//THE END.

Compiler output:
a.cc:29:14: error: expected unqualified-id before 'int'
   29 | #define cncn int cnt=0
      |              ^~~
a.cc:63:12: note: in expansion of macro 'cncn'
   63 | int c = 0, cncn, asas;
      |            ^~~~
Language: Java

import java.util.*;
 
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long A = sc.nextLong(); 
    long B = sc.nextLong();
    long a = A;
    long b = B;
    long r = 1;
    for (;r!=0;){
      r = a % b;
      a = b;
      b = r;
    }
    int ans = A * B / a;
    System.out.println(ans);
  }
}

Compiler output:
Main.java:16: error: incompatible types: possible lossy conversion from long to int
    int ans = A * B / a;
                    ^
1 error
Language: C++

#include <iostream>
using namespace std;
int main()
{
    int n1, n2, max;

    cin >> n1 >> n2;
    
    // maximum value between n1 and n2 is stored in max
    max = (n1 > n2) ? n1 : n2;
    do
    {
        if (max % n1 == 0 && max % n2 == 0)
        {
            cout<< max;
            break;
        }
        else
            ++max;
    } while (true);
    
    return 0;
}
Output

Compiler output:
a.cc:24:1: error: 'Output' does not name a type
   24 | Output
      | ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <string>
#include <climits>
#include <tuple>
#include <unordered_map>
#include <set>
#include <unordered_set>
#define rep(i, n) for(Int (i) = 0; (i) < (n); (i)++)
using namespace std;
using Int = int64_t;
constexpr long long int mod = 1e9 + 7;

//aとbが割り切れるまで割る(既約分数になるまで)
std::pair<Int, Int> Reduce(Int a, Int b) {

	const auto f = [](Int n) -> unordered_map<Int, Int> {
		unordered_map<Int, Int> res;
		for (Int i = 2; i * i <= n; ++i) {
			if (n % i != 0)continue;
			res[i] = 0;
			while (n % i == 0) {
				n /= i;
				res[i]++;
			}
		}
		if (n != 1)res[n] = 1;
		return res;
	};

	auto res_a = f(a), res_b = f(b);

	Int ans = 1;// 割るべき数

	for (auto itr = res_a.begin(); itr != res_a.end(); ++itr) {
		auto tmp = res_b.find(itr->first);
		if (tmp != res_b.end()) {//もしbにも同様の因数があったら
			ans *= (pow(itr->first, min(res_b[itr->first], itr->second)));
		}
	}

	return make_pair(a / ans, b / ans);

}

int main() {

	Int A, B; cin >> A >> B;

	cout << Reduce(A, B).first * B << endl;

}

Compiler output:
a.cc: In function 'std::pair<long int, long int> Reduce(Int, Int)':
a.cc:41:33: error: 'pow' was not declared in this scope
   41 |                         ans *= (pow(itr->first, min(res_b[itr->first], itr->second)));
      |                                 ^~~
Language: C++

#include <bits/stdc++.h>

#define ll long long
#define vi vector<int>
#define pi pair<int, int>
  
using namespace std;                           

long long a, b;

int main(){
	
  cin >> A >> B;
  for(int i = 1; i <= b; i++){
    if((a * i) % b == 0){
      cout << a * i << endl;
      break;
    }
  }
  return 0;
}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'A' was not declared in this scope
   13 |   cin >> A >> B;
      |          ^
a.cc:13:15: error: 'B' was not declared in this scope
   13 |   cin >> A >> B;
      |               ^
a.cc: At global scope:
a.cc:22:5: error: expected unqualified-id before 'return'
   22 |     return 0;
      |     ^~~~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  long A,a,B,b,L,LCM;
  bool s=true;
  
  cin>>A>>B;
  a=A; b=B;
  
  if(A>B){
  	while(s){
      L=a%b; a=b;b=L;
      if(L==0){s=false;}
    }
    LCM=A*B/a;
  }
  
  if(B>A){
    while(s){
      L=b%a; b=a;a=L;
      if(L==0){s=false;}
    }
    LCM=A*B/b
  }
  cout<<LCM;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:14: error: expected ';' before '}' token
   24 |     LCM=A*B/b
      |              ^
      |              ;
   25 |   }
      |   ~
Language: C++

#include<iostream>
using namespace std;

int main(){
  long A,a,B,b,L=,LCM;
  bool s=true;
  
  cin>>A>>B;
  a=A; b=B;
  
  if(A>B){
  	while(s){
      L=a%b; a=b;b=L;
      if(L==0){s=false;}
    }
  }
  
  if(B>A){
    while(s){
      L=b%a; b=a;a=L;
      if(L==0){s=false;}
    }
  }
   
  LCM=A*B/a;
  cout<<LCM;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:18: error: expected primary-expression before ',' token
    5 |   long A,a,B,b,L=,LCM;
      |                  ^
a.cc:25:3: error: 'LCM' was not declared in this scope
   25 |   LCM=A*B/a;
      |   ^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  long A,a,B,b,L=,LCM;
  bool s=true;
  
  cin>>A>>B;
  a=A; b=B;
  
  if(A>B){
  	while(s){
      L=a%b; a=b;b=L;
      if(L=0){s=false;}
    }
  }
  
  if(B>A){
    while(s){
      L=b%a; b=a;a=L;
      if(L=0){s=false;}
    }
  }
   
  LCM=A*B/a;
  cout<<LCM;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:18: error: expected primary-expression before ',' token
    5 |   long A,a,B,b,L=,LCM;
      |                  ^
a.cc:25:3: error: 'LCM' was not declared in this scope
   25 |   LCM=A*B/a;
      |   ^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A,a,B,b,L,LCM;
  bool s=false;
  
  cin>>A>>B;
  a=A; b=B;
  
  if(A>B){
  	while(a){
      L=a%b; a=b;b=L;
      if(L=0){s=true}
    }
  }
  
  if(B>A){
    while(a){
      L=b%a; b=a;a=L;
      if(L=0){s=true}
    }
  }
   
  LCM=A*B/L;
  cout<<LCM;
}
    
  
    

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: expected ';' before '}' token
   14 |       if(L=0){s=true}
      |                     ^
      |                     ;
a.cc:21:21: error: expected ';' before '}' token
   21 |       if(L=0){s=true}
      |                     ^
      |                     ;
Language: C++

    #include <stdio.h>
     
    int main()
    {
      int A, B, r, tmp;
     
      scanf("%d", &A);
      scanf("%d", &B);
     
      if(A<B){
        tmp = A;
        A = B;
        A = tmp;
      }
     
      r = A % B;
      while(r!=0){
        A = B;
        B = r;
        r = A % B;
      }
     
      printf(B);
     
      return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   23 |       printf(B);
      |              ^
      |              |
      |              int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <stdio.h>
 
int main()
{
  int A, B, r, tmp;
 
  scanf("%d", &A);
  scanf("%d", &B);
 
  if(A<B){
    tmp = a;
    a = b;
    b = tmp;
  }
 
  r = A % B;
  while(r!=0){
    A = B;
    B = r;
    r = A % B;
  }
 
  printf(B);
 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'a' was not declared in this scope
   11 |     tmp = a;
      |           ^
a.cc:12:9: error: 'b' was not declared in this scope
   12 |     a = b;
      |         ^
a.cc:23:10: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   23 |   printf(B);
      |          ^
      |          |
      |          int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: Java

import java.util.Scanner;
public class d7{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();int b = sc.nextInt();
        if(b>a){
            for(int i = a;i<=a*b;i++){
                if(i%a ==0 && i%b==0) {
                    System.out.println(i);
                    break;
                }
            }
        }else
            for(int i=b;i<a*b;i++) {
                if (i % a == 0 && i % b == 0) {
                    System.out.println(i);
                    break;
                }
            }
        }
    }

Compiler output:
Main.java:2: error: class d7 is public, should be declared in a file named d7.java
public class d7{
       ^
1 error
Language: Java

import java.util.Scanner;
public class tre {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long i = 2;
        long j = 2;
        long s = 0;
        long t = 1;
        while (s != t) {
            if (s < t) {
                s = a * i;
                i++;
            } else {
                t = b * j;
                j++;
            }
        }
        System.out.println(s);
    }
}


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

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

int main(){
  int a,b;
  cin >> a >> b;
  int gcans = __gcp(a,b);
  cout << gcans*(a/gcans)*(b/gcans) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: '__gcp' was not declared in this scope
    7 |   int gcans = __gcp(a,b);
      |               ^~~~~
Language: C++

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

int main(){
  long long a,b;
  cin >>a>>b;
  int sum=1;

  for(int i=2;i<min(a,b);i++)
    if(a%i==0 && b%i==0){
      a=a/i;
      b=b/i;
      sum *= i;
      i = i - 1;
    }
  }
  cout << a*b*sum << endl;
}

Compiler output:
a.cc:17:3: error: 'cout' does not name a type
   17 |   cout << a*b*sum << endl;
      |   ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

int main(){
  long long a,b;
  cin >>a>>b;
  int sum=1;

  for(int i=2;i<min(a,b);i++)
    if(a%i==0 && b%i==0){
      a=a/i;
      b=b/i;
      sum *= i;
      i = i - 1;
    }
  }
  cout << a*b*sum << endl;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int main(){
      | ~~~                 
a.cc:17:3: error: 'cout' does not name a type
   17 |   cout << a*b*sum << endl;
      |   ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

int main(){
  int a, b;
  cin >> a >> b;
  
  // a =< b となるようにする
  if(a>b){
    int c = b;
    b = a;
    a = c;
  }
  
  int res;
  for(int i=1; i=<a; i++){
    if((b*i) % a == 0){
      res = b*i;
      break;
    }
  }
  
  cout << res << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: expected primary-expression before '<' token
   16 |   for(int i=1; i=<a; i++){
      |                  ^
Language: C++

#include <iostream>
using namespace std;

int main() {
long long a,b;
cin >> a >> b;
for (int i = 1; i <= B; i++){
if ((a*i)%b == 0){cout << a * i << endl; break;}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'B' was not declared in this scope
    7 | for (int i = 1; i <= B; i++){
      |                      ^
Language: C++

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

int main() {
long long a,b;
cin >> a >> b;
for (int i = 1; i <= B; i++){
if ((a*i)%b == 0){cout << a * i << endl; break;}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'B' was not declared in this scope
    7 | for (int i = 1; i <= B; i++){
      |                      ^
Language: C++

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

int main() {
long long a,b;
cin >> a >> b;
for (int i = 1; i <= B; i++){
if ((a*i)%b == 0){cout << a * i << endl; break;}
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'B' was not declared in this scope
    7 | for (int i = 1; i <= B; i++){
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
  int A,B;
  int maxi = 1;
  cin >> A >> B;
  for(int i = 0; i < 10*10*10*10*10; i++){
    if((A % i == 0) && (B % i == 0)){
      maxi = i;
    }else if(A < i || B < i){
      break;
    }else{
      return maxi;
    }
    cout << (A / maxi) * (B / maxi) * maxi << endl;
  }
}
  

Compiler output:
a.cc:5:3: error: expected initializer before 'int'
    5 |   int A,B;
      |   ^~~
a.cc:7:3: error: 'cin' does not name a type
    7 |   cin >> A >> B;
      |   ^~~
a.cc:8:3: error: expected unqualified-id before 'for'
    8 |   for(int i = 0; i < 10*10*10*10*10; i++){
      |   ^~~
a.cc:8:18: error: 'i' does not name a type
    8 |   for(int i = 0; i < 10*10*10*10*10; i++){
      |                  ^
a.cc:8:38: error: 'i' does not name a type
    8 |   for(int i = 0; i < 10*10*10*10*10; i++){
      |                                      ^
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    int b = scan.nextInt();
    
    int x = 1;
    
    while(true){
      if(x % a == 0 && y % b == 0){
        break;
      }else{
        x += 1;
      }
    }
    
    System.out.println(x);
    
  }
}

Compiler output:
Main.java:11: error: cannot find symbol
      if(x % a == 0 && y % b == 0){
                       ^
  symbol:   variable y
  location: class Main
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int hcf(int a,int b)
{
  if(b==0)
    return a;
  else
    return hcf(b,abs(a-b));
int main()
{
  int a,b;
  cin>>a>>b;
  int gcd=hcf(a,b);
  int ans=(a*b)/gcd;
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int hcf(int, int)':
a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    9 | int main()
      |         ^~
a.cc:9:9: note: remove parentheses to default-initialize a variable
    9 | int main()
      |         ^~
      |         --
a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:10:1: error: a function-definition is not allowed here before '{' token
   10 | {
      | ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void){
  int A,B,a,b,tmp;
  char str[20];
  
  fgets(str,sizeof(str),stdin);
  A=atoi(strtok(str," "));
  B=atoi(strtok(NULL," "));
  
  a=A;
  b=B
  while(a%b!=0){
    tmp=a%b;
    a=b;
    b=tmp;
  }
  printf("%d\n",A*B/b);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:6: error: expected ';' before 'while'
   14 |   b=B
      |      ^
      |      ;
   15 |   while(a%b!=0){
      |   ~~~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
typedef long long int;
const int INF=1001001001;
int main(){
	int a,b;
	cin >> a >> b;
	int tmp;
	int x = a * b;

	if(a<b){
		tmp = a;
		a = b;
		b = tmp;
	}
	int r = a % b;
	while(r!=0){
		a = b;
		b = r;
		r = a%b;
	}
	cout << x/b << endl;
	return 0;

}




Compiler output:
a.cc:4:19: error: declaration does not declare anything [-fpermissive]
    4 | typedef long long int;
      |                   ^~~
Language: C++

#include<iostream>

using namespace std;

int gcd(int m,int n)//求最大公约数 


int lcm(int m,int n,int r)

{

int t;

t=m*n/r;

return t;

}

int main()

{

int m,n,r,t;



cin>>m>>n;



t=lcm(m,n,r);




cout<<t<<endl;

return 0;

}

Compiler output:
a.cc:8:1: error: expected initializer before 'int'
    8 | int lcm(int m,int n,int r)
      | ^~~
a.cc: In function 'int main()':
a.cc:32:3: error: 'lcm' was not declared in this scope
   32 | t=lcm(m,n,r);
      |   ^~~
Language: C++

#include <bits/std++.h>
using namespace std;
int main(){
	int a,b;
	cin>>a>>b;
	int c;
	c=lowest_common_multiple(a,b);
	cout<<c;
	return 0;
}

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